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


i need send full objects javascript php. seemed pretty obvious json.stringify() , json_decode() on php end, allow strings ":" , ","? need run escape() function on big user input strings may cause issue? escape function be? don't think escape works purposes.

are there downsides json.stringify() need know about?

thanks

yes, it's reliable in decent implementation (like crockford's), , no, don't have run through escape first (if that, php pretty confused @ other end). browsers starting own implementations of json stuff (now it's in 5th edition spec), now, may best off using crockford's or similar.


Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -