Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

json data include double quotes

 
zb cong
Ranch Hand
Posts: 416
  • 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: 64702
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • 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
  • 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
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for helps. the escape helps, btw, what is XSS encoding?

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic