json
Summary
Methods
decode
Syntax
decode
(
Object
-
[data]
Summary
Decodes a JSON string to a JavaScript object.
Parameters:
-
[data]
Object optionalThe JSON string to be decoded.
Returns:
Object:
An Object with the decoded data, or an empty object if something went wrong.
encode
Syntax
encode
(
String
-
[data]
Summary
Encodes any JavaScript object into a JSON string that can be written to a file.
Parameters:
-
[data]
Object optionalAny JavaScript object to be encoded.
Returns:
String:
A valid JSON representation of the data.