The JSON object contains methods for parsing JSON and converting values to JSON. This object is the same as the standard JSON object available in most JavaScript Runtime Environments.
Do not call eval()
directly, as doing so poses a significant security risk. Instead, use JSON.parse()
.
It is not possible to override any properties on the global JSON object.
Methods
Method
|
Description
|
---|---|
|
Parses a string as JSON, optionally transforms the produced value and its properties, and returns the value. Refer to |
|
Returns a JSON string corresponding to the specified value, optionally including only certain properties or replacing property values in a user-defined manner. Refer to You cannot customize the behavior of the |