JSON Methods: stringify()

By: Dusty Arlia
Published on Sunday, November 23, 2014 at 9:01 PM
Last Updated on Saturday, July 11, 2015 at 9:11 PM
Total Updates: 2

The stringify() method of the JavaScript JSON object is used to serialize an object, array, or primitive value. Here is its basic syntax.

JSON.stringify(o)

o is the object, array, or primitive value to be converted to a JSON string. This method returns a JSON-formatted string representing the o value.

The JSON-formatted string returned by this method can then be parsed with JSON.parse() (to convert the JSON-formatted string back to the JavaScript object, array, or primitive value).

Comments:

Ad: