File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

json data include double quotes

 
zb cong
Ranch Hand
Posts: 416
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64178
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just like anyplace else in Java or JavaScript, the quotes need to be escaped.
 
Krutik pandya
Greenhorn
Posts: 6
Eclipse IDE Java Oracle
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can utilize escape characters or you can also utilize XSS encoding to send data in JSON.
 
zb cong
Ranch Hand
Posts: 416
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for helps. the escape helps, btw, what is XSS encoding?

 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic