mirror of
https://github.com/ethauvin/JSON-java.git
synced 2025-06-17 07:50:52 -07:00
properly unescape tokens in JSONML for reversability.
This commit is contained in:
parent
f58a0f4684
commit
adb0478f66
1 changed files with 2 additions and 2 deletions
|
@ -175,7 +175,7 @@ public class JSONML {
|
|||
if (!(token instanceof String)) {
|
||||
throw x.syntaxError("Missing value");
|
||||
}
|
||||
newjo.accumulate(attribute, keepStrings ? token :XML.stringToValue((String)token));
|
||||
newjo.accumulate(attribute, keepStrings ? XML.unescape((String)token) :XML.stringToValue((String)token));
|
||||
token = null;
|
||||
} else {
|
||||
newjo.accumulate(attribute, "");
|
||||
|
@ -226,7 +226,7 @@ public class JSONML {
|
|||
} else {
|
||||
if (ja != null) {
|
||||
ja.put(token instanceof String
|
||||
? keepStrings ? token :XML.stringToValue((String)token)
|
||||
? keepStrings ? XML.unescape((String)token) :XML.stringToValue((String)token)
|
||||
: token);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue