How to escape "\" from JSON string in Titanium? -
I have written an original Android module, where I'm returning Jason String to the Javascript layer. But in the Javascript layer, I'm getting this Jason String, which adds "\" to everyone. How to Avoid "\" from this "j" string.
It looks like your json is not a "real JSON object" , But just a string to explain why
" symbols are saved. Try using
JSON.parse () in your Javascript.
var my_json_string = "{\" my_key \ ": \" the_value \ "}"; var my_json_object = JSON.parse (my_json_string); // something should be present such as / / object {my_key: "the_value "}
Comments
Post a Comment