Skip to content

Commit adb0478

Browse files
author
John J. Aylward
committed
properly unescape tokens in JSONML for reversability.
1 parent f58a0f4 commit adb0478

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

JSONML.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ private static Object parse(
175175
if (!(token instanceof String)) {
176176
throw x.syntaxError("Missing value");
177177
}
178-
newjo.accumulate(attribute, keepStrings ? token :XML.stringToValue((String)token));
178+
newjo.accumulate(attribute, keepStrings ? XML.unescape((String)token) :XML.stringToValue((String)token));
179179
token = null;
180180
} else {
181181
newjo.accumulate(attribute, "");
@@ -226,7 +226,7 @@ private static Object parse(
226226
} else {
227227
if (ja != null) {
228228
ja.put(token instanceof String
229-
? keepStrings ? token :XML.stringToValue((String)token)
229+
? keepStrings ? XML.unescape((String)token) :XML.stringToValue((String)token)
230230
: token);
231231
}
232232
}

0 commit comments

Comments
 (0)