![]() |
Qore json Module 1.9.1
|
Functions | |
| string | Qore::Json::makeFormattedJSONString (auto data, *string encoding) |
| Serializes qore data into a JSON string, formatted with line breaks for easier readability. | |
| string | Qore::Json::makeJSONString (auto data, *string encoding) |
| Serializes qore data into a JSON string, without any line breaks. | |
| string | Qore::Json::make_json (auto data, *int format, *string encoding) |
| Serializes qore data into a JSON string with optional whitespace formatting (line breaks and indentation) | |
| 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. | |
| auto | Qore::Json::parseJSON (string json_str) |
| Parses a JSON string and returns the corresponding Qore data structure. | |
| auto | Qore::Json::parse_json (string json_str) |
| Parses a JSON string and returns the corresponding Qore data structure. | |
| string Qore::Json::make_json | ( | auto | data, |
| *int | format, | ||
| *string | encoding | ||
| ) |
Serializes qore data into a JSON string with optional whitespace formatting (line breaks and indentation)
By default the string produced will be in UTF-8 encoding, but this can be overridden by the encoding argument
| data | the data to serialize to a JSON string |
| format | optional formatting flags; see JSON Generation Constants for more information |
| 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) |
| ENCODING-CONVERSION-ERROR | this exception could be thrown if an error occurs converting input strings to the target encoding |
| string Qore::Json::makeFormattedJSONString | ( | auto | 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 | ( | auto | 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) |
| auto Qore::Json::parse_json | ( | 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 |
| 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.
| auto 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 |