namespace bot.json

Functions

parse(jsonStr)code »

Parses a JSON string and returns the result.

Parameters
jsonStrstring

The string to parse.

Returns

The JSON object.

Throws
Error

If the input string is an invalid JSON string.


stringify(jsonObj, opt_replacer)code »

Converts a JSON object to its string representation.

Parameters
jsonObj*

The input object.

opt_replacer?function(string, *): *=

A replacer function called for each (key, value) pair that determines how the value should be serialized. By default, this just returns the value and allows default serialization to kick in.

Returns
string

A JSON string representation of the input object.

Compiler Constants

NATIVE_JSONboolean
No description.