[Sojo-user] backslash problem of parsing json
Brought to you by:
linkemario
From: yoshio y. <lar...@gm...> - 2008-04-08 13:30:32
|
Hi, I got the latest code of sojo from svn. And I test about the backslash problem. (1769131: incorrectly escapized backslash) But one test failed. [Code] String jsonString = "{ \"str1\": \"abc\\\\\", \"str2\": \"def\" }"; JsonSerializer serializer = new JsonSerializer(); System.out.println("[testEscapedString] "+ serializer.deserialize(jsonString)); [Error] net.sf.sojo.interchange.json.JsonParserException: Exception in String: '{ "str1": "abc\\", "str2": "def" }' --> Lexical error at line 1, column 21. Encountered: "s" (115), after : "" at net.sf.sojo.interchange.json.JsonParser.parse(JsonParser.java:40) at net.sf.sojo.interchange.json.JsonSerializer.deserialize(JsonSerializer.java:42) at net.sf.sojo.interchange.AbstractSerializer.deserialize(AbstractSerializer.java:51) # It seems a problem about the Token of javacc. |