Create the following code:
JsonObject jsonObj = new JsonObject();
jsonObj.add("quotes", new JsonPrimitive("this is a double quote:'\"'"));
System.out.println(jsonObj.toString());
I expected this string to be printed:
{"quotes":"this is a double quote:'\"'"}
however i get this one instead:
{"quotes":"this is a double quote:'"'"}
It's odd because if I have an object (non JsonObject) with a field with
quotes and i use GsonBuilder to convert it into a string it correctly
escapes the double quotes.
I am using version 1.3.
Please provide any additional information below.
Original issue reported on code.google.com by rafael.c...@gmail.com on 24 Dec 2009 at 12:59
Original issue reported on code.google.com by
rafael.c...@gmail.com
on 24 Dec 2009 at 12:59