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
if Gson instance is obtained from GsonBuilder with pretty print
GsonBuilder builder = new GsonBuilder();
builder.setPrettyPrinting();
Gson gson = builder.create();
it would produce un-parseable json string if the object contains an empty map
example:
{"viewsStale":true,"fireAllRules":0,"formRules":[],"dcs":[{"accountId":1,
"createdBy":"","name":"dc1","m_segmentGroup":{"accountId":1,
"nextRuleId":0,"name":"dc1","createdBy":"","rules":{}"description":
"desc"},"m_dcmTexts":{}}],"dispatchableName":"disp1","typeCode":-1,
"subType":"GENERIC","name":"disp1","status":"A"}
notice missing comma here ("rules":{}"description":)
correct output without pretty print
{"viewsStale":true,"fireAllRules":0,"formRules":[],"dcs":[{"accountId":1,"create
dBy":"","name":"dc1","m_segmentGroup":{"accountId":1,"nextRuleId":0,"name":"dc1"
,"createdBy":"","rules":{},"description":"desc"},"m_dcmTexts":{}}],"dispatchable
Name":"disp1","typeCode":-1,"subType":"GENERIC","name":"disp1","status":"A"}
What version of the product are you using? On what operating system?
latest product. java: 1.6, os: xp
Please provide any additional information below.
Original issue reported on code.google.com by jackwum...@gmail.com on 2 Sep 2009 at 9:13
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
jackwum...@gmail.com
on 2 Sep 2009 at 9:13The text was updated successfully, but these errors were encountered: