|
Qore JSON Module
1.5
|
Functions | |
| string | Qore::Json::makeFormattedJSONString (any data, *string encoding) |
| Serializes qore data into a JSON string, formatted with line breaks for easier readability. More... | |
| string | Qore::Json::makeJSONString (any data, *string encoding) |
| Serializes qore data into a JSON string, without any line breaks. More... | |
| string | Qore::Json::make_json (any data, *int format, *string encoding) |
| Serializes qore data into a JSON string with optional whitespace formatting (line breaks and indentation) More... | |
| 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. More... | |
| any | Qore::Json::parseJSON (string json_str) |
| Parses a JSON string and returns the corresponding Qore data structure. More... | |
| any | Qore::Json::parse_json (string json_str) |
| Parses a JSON string and returns the corresponding Qore data structure. More... | |
| string Qore::Json::make_json | ( | any | 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 | ( | 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) |
| any 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.
| 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 |