Hatch Game Engine Documentation v1.4.0
The documentation for the Hatch Game Engine
Loading...
Searching...
No Matches
JSON Class Reference

JSON parsing and writing. More...

Public Member Functions

map Parse (string jsonText)
 Decodes a string value into a map value.
string ToString (value json, boolean prettyPrint)
 Converts a value into a JSON string.

Detailed Description

JSON parsing and writing.

Member Function Documentation

◆ Parse()

map JSON.Parse ( string jsonText)

Decodes a string value into a map value.

Parameters
jsonTextJSON-compliant text.
Returns
Returns a map value if the text can be decoded, otherwise returns null.

◆ ToString()

string JSON.ToString ( value json,
boolean prettyPrint )

Converts a value into a JSON string.

Parameters
jsonThe value to convert.
prettyPrintWhether to use spacing and newlines in the text.
Returns
Returns a JSON string based on the value.