aspose file tools*
The moose likes Servlets and the fly likes json data include double quotes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "json data include double quotes" Watch "json data include double quotes" New topic
Author

json data include double quotes

zb cong
Ranch Hand

Joined: Jan 14, 2002
Posts: 416
hello,

The double-quota(") is used to identify the json key and value, but if the key or value include double-quota themselves, the json editor will report the error, how to handle this case? thanks
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61415
    
  67

Just like anyplace else in Java or JavaScript, the quotes need to be escaped.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Krutik pandya
Greenhorn

Joined: Dec 17, 2012
Posts: 6

you can utilize escape characters or you can also utilize XSS encoding to send data in JSON.
zb cong
Ranch Hand

Joined: Jan 14, 2002
Posts: 416
thanks for helps. the escape helps, btw, what is XSS encoding?

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: json data include double quotes