Monday, May 3, 2010

Simplejson dumps char \

Programmer Question


Hi! Im programming with django and i need to serialize an object to a string, but i need to get the string \/ serialized.



An example:



simplejson.dumps({'id' : 'root\/leaf'})



I need an output like this:



'{"id": "root\/leaf"}'



but i get this:



'{"id": "root\\\\leaf"}'



Thank you!!



PD: Sorry for my english :-P





Find the answer here

No comments:

Post a Comment

LinkWithin

Related Posts with Thumbnails