Skip to main content

Module JSON

Module JSON 

Source
Expand description

The JSON object contains methods for parsing JavaScript Object Notation (JSON) and converting values to JSON. It can’t be called or constructed, and aside from its two method properties, it has no interesting functionality of its own.

Functions§

is_raw_json
The JSON.isRawJSON() method returns whether a value is a raw JSON object created by JSON.rawJSON().
parse
The JSON.parse() method parses a JSON string, constructing the JavaScript value or object described by the string.
raw_json
The JSON.rawJSON() method creates a raw JSON object whose text is emitted verbatim by JSON.stringify(), allowing values such as large integers to round-trip without precision loss. Throws a SyntaxError unless text is valid JSON for a primitive.
stringify
The JSON.stringify() method converts a JavaScript value to a JSON string.
stringify_with_replacer
The JSON.stringify() method converts a JavaScript value to a JSON string.
stringify_with_replacer_and_space
The JSON.stringify() method converts a JavaScript value to a JSON string.
stringify_with_replacer_func
The JSON.stringify() method converts a JavaScript value to a JSON string.
stringify_with_replacer_list
The JSON.stringify() method converts a JavaScript value to a JSON string.