Functions8 public, 1 private
| Returns if the provided data can be serialized as JSON string. An example for data that cannot be serialized: binary | |||
| public | boolean | canBeSerializedAsJson | |
| required | any | data | |
| Deserializes JSON with additional features: - support for comments like ##, // and /* */ - unquoted keys - single quotes - trailing commas - leading/trailing decimal point & leading zeros | |||
| public | any | deserializeJSON | |
| any | data | ||
| struct | OPTIONS | {} | |
| option | boolean | throwOnError | false |
| Deserializes JSON with additional features: - {} = LinkedHashMap - [] = ArrayList - support for comments like ##, // and /* */ - unquoted keys - single quotes - trailing commas - leading/trailing decimal point & leading zeros | |||
| public | any | fromJSON | |
| any | data | ||
| struct | OPTIONS | {} | |
| option | boolean | throwOnError | false |
| Historical alias for function [deserializeJSON]. | |||
| public | any | jsonDeserialize | |
| any | data | ||
| struct | OPTIONS | {} | |
| Historical alias for function [serializeJSON]. | |||
| public | string | jsonSerialize | |
| any | data | ||
| struct | OPTIONS | {} | |
| Escapes the provided value according to JSON specs. | |||
| public | string | jsonEscape | |
| required | string | value | |
| boolean | preserveSpecialChars | false | |
| Stringifies the provided data as JSON. Components may implement a function named [serialize] to expose custom information. | |||
| public | string | serializeJSON | |
| any | data | ||
| struct | OPTIONS | {} | |
| option | boolean | lowercase | false |
| transform all keys to uppercase | |||
| option | boolean | uppercase | false |
| pretty-print JSON | |||
| option | boolean | prettyprint | false |
| option | string | prettyIndent | chr(9) |
| option | string | prettyNewline | chr(10) |
| option | boolean | throwOnError | false |
| Fastest way to stringify (null, boolean, number, string, array, struct) JSON. Components are converted to null. | |||
| public | string | toJSON | |
| any | data | ||