Qore JSON Module
1.1
|
Functions | |
string | Qore::Json::makeFormattedJSONString (any data, *string encoding) |
Serializes qore data into a JSON string, formatted with line breaks for easier readability. | |
string | Qore::Json::makeJSONString (any data, *string encoding) |
Serializes qore data into a JSON string, without any line breaks. | |
nothing | Qore::Json::parseJSON () |
This is a variant that is basically a noop, included for backwards-compatibility for functions that ignored type errors in the calling parameters. | |
any | Qore::Json::parseJSON (string json_str) |
Parses a JSON string and returns the corresponding Qore data structure. |
string Qore::Json::makeFormattedJSONString | ( | any | data, |
*string | encoding | ||
) |
Serializes qore data into a JSON string, formatted with line breaks for easier readability.
By default the string produced will be in UTF-8 encoding, but this can be overridden by the second argument
data | the data to serialize to a JSON string |
encoding | an optional output encoding for the resulting JSON string; if this argument is not passed, then UTF-8 encoding is used by default |
JSON-SERIALIZATION-ERROR | cannot serialize value passed (ex: binary, object) |
string Qore::Json::makeJSONString | ( | any | data, |
*string | encoding | ||
) |
Serializes qore data into a JSON string, without any line breaks.
By default the string produced will be in UTF-8 encoding, but this can be overridden by the second argument
data | the data to serialize to a JSON string |
encoding | an optional output encoding for the resulting JSON string; if this argument is not passed, then UTF-8 encoding is used by default |
JSON-SERIALIZATION-ERROR | cannot serialize value passed (ex: binary, object) |
nothing Qore::Json::parseJSON | ( | ) |
This is a variant that is basically a noop, included for backwards-compatibility for functions that ignored type errors in the calling parameters.
any Qore::Json::parseJSON | ( | string | json_str | ) |
Parses a JSON string and returns the corresponding Qore data structure.
json_str | the JSON string to parse |
JSON-PARSE-ERROR | syntax error parsing JSON string |