JavaScript JSON : Object
Contains methods for encoding and decoding JSON strings.
JSON Methods
parse
2 variants
stringify
3 variants
Converts value
to a JSON string. If value
has a toJSON()
method on it,
the return value of that method will be used.
Example:
RunResults:
Converts value
to a JSON string. If keyNames
is not null
, only key/value
pairs where the key is in keyNames
will be in the JSON string. If indent
is specified,
each key/value pair will be on a new line with the indent
string before the key.
Example:
RunResults:
Converts value
to a JSON string. The replacer
function is called for each key/value pair
and the return value is used as the value in the final string. If indent
is specified, each key/value
pair will be on a new line with the indent
string before the key.
Example:
RunResults:
Copyright © PUBLIC Contributors