You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
call JsonObject.toString() result is not a realy JSONString
because some char is not quoted!!!
Gson gson = new Gson();
JsonParser p = new JsonParser();
JsonElement r = p.parse("{\"text\":\"good\\n after\\nnoom\"}");
JsonObject ob = r.getAsJsonObject();
r.toString() \\ espect {"text":"good\\n after\\nnoom\"} but {"text":"good
after
noom\"}
Original issue reported on code.google.com by lxb...@gmail.com on 9 Sep 2009 at 9:56
The text was updated successfully, but these errors were encountered:
I will create a change to fix this to at least use the basic escaping according
to
the JSON spec.
Since the Gson object can be configured to do extra escaping (i.e. HTML, JS,
etc.),
you can always use the following method to generate valid JSON from some
JsonElement
object:
{@link Gson#toJson(JsonElement)}
Original comment by joel.leitch@gmail.com on 23 Sep 2009 at 5:31
Original issue reported on code.google.com by
lxb...@gmail.com
on 9 Sep 2009 at 9:56The text was updated successfully, but these errors were encountered: