Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
utils-1.9.0
-
None
Description
JSONWriter currently adds an escape char for '/'. So "foo=/bar" is rendered as
{"foo":"\/bar"}
When such a json is read via JSONParser then the '\' is not removed
Following test fails
@Test public void escapeChar() throws Exception{ StringWriter sw = new StringWriter(); JSONWriter js = new JSONWriter(sw); js.object().key("foo").value("/bar").endObject().flush(); JSONParser jp = new JSONParser(sw.toString()); assertEquals("/bar", jp.getParsed().get("foo")); }