PHP's json_encode does not escape all JSON control characters -
Is there any reason that PHP's json_encode function does not escape all the control characters in the string?
For example, take a string that extends into two rows and has the control letter (\ r \ n "/ \):
Note that the carriage return and the newline characters are unrecognized. ?
I'm using the jQuery library and this $$$getJSON () function is okay when you fully believe the 100% incoming data. Otherwise I would like to have JSON.org's library I use json2.js as everyone else. But if you try to parse that encoded string If so, it throws an error:
Comments
Post a Comment