I have seen references to some browsers natively supporting JSON parsing/serialization of objects safely and efficiently via the window.JSON Object, but details are hard to come by. Can anyone point in the right direction? What are the methods this Object exposes? What browsers is it supported under?
I have seen references to some browsers natively supporting JSON parsing/serialization of objects safely
Share
All modern browsers support native JSON encoding/decoding (Internet Explorer 8+, Firefox 3.1+, Safari 4+, and Chrome 3+). Basically,
JSON.parse(str)will parse the JSON string instrand return an object, andJSON.stringify(obj)will return the JSON representation of the objectobj.More details on the MDN article.