Is JSON.stringify() reliable for serializing JSON objects?

Posted by Colin on Stack Overflow See other posts from Stack Overflow or by Colin
Published on 2010-04-27T17:13:17Z Indexed on 2010/04/27 17:23 UTC
Read the original article Hit count: 390

I need to send full objects from Javascript to PHP. It seemed pretty obvious to do JSON.stringify() and then json_decode() on the PHP end, but will this allow for strings with ":" and ","? Do I need to run an escape() function on big user input strings that may cause an issue? What would that escape function be? I don't think escape works for my purposes.

Are there any downsides to JSON.stringify() I need to know about?

Thanks

© Stack Overflow or respective owner

Related posts about JSON

Related posts about serialize