have double quotes in string, gson won't escape it.
10,453 views
Skip to first unread message
stalker
unread,
Jul 11, 2009, 12:02:16 AM7/11/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to google-gson
Hi guys gson is not escaping double quotes in string. Anybody have any
solution ?
Demo program
/******************/
public class Demo{
public static void main(String args[]){
String test = "Hey there. I am \"here\"";
JsonObject jsonObject = JsonParser.parse(new Gson().toJson(test));
System.out.println("JSON is " + jsonObject.toString());
}
}
GSON is not escaping the double quote inside string...
Please help..
Dennis Benzinger
unread,
Jul 11, 2009, 8:39:09 AM7/11/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message