net.sf.json.JSONObject adds backslashes where it's not expected ?
Posted
by cx42net
on Stack Overflow
See other posts from Stack Overflow
or by cx42net
Published on 2010-05-27T15:10:27Z
Indexed on
2010/05/27
15:21 UTC
Read the original article
Hit count: 196
Hi there,
I'm loosing my hair trying to figure out why net.sf.json.JSONObject add extra backslash where it shouldn't on my java code :
JSONObject obj = new JSONObject ();
obj.element ("column_name", "<a href=\"#\" title=\"test\">Test !</a>");
will output :
<a href=\"#\" title=\"test\">Test !<\/a>
with an extra "\" near <\/a>.
How can I avoid this behavior ?
Thanks for your help !
© Stack Overflow or respective owner