public class JSON
JSON utility entry-point.
Notes:
| Modifier and Type | Member | Description |
|---|---|---|
| public static | parse | Parses JSON text into its natural Klyn representation. |
| public static | parseparse<TYPE>(notnull json as String) as TYPE |
Parses JSON text using the explicitly requested static type. |
| public static | parseListparseList(source as Object) as ArrayList<Object> throws IOException |
Parses JSON array from a string, a reader or a file. |
| public static | parseMapparseMap(source as Object) as SortedMap<String, Object> throws IOException |
Parses JSON object from a string, a reader or a file. |
| public static | stringifystringify(filename as String, value as Object, spaces as Boolean = true, pretty as Boolean = false, indent as Int = 0) as String throws JSONWriteException, IOException |
Serializes a value and writes it to a file named by a string. |
| public static | stringifystringify(notnull writer as TextWriter, value as Object, spaces as Boolean = true, pretty as Boolean = false, indent as Int = 0) as String throws JSONWriteException, IOException |
Serializes a value and writes it to a text writer. |
| public static | stringifystringify(path as Path, value as Object, spaces as Boolean = true, pretty as Boolean = false, indent as Int = 0) as String throws JSONWriteException, IOException |
Serializes a value and writes it to a path. |
| public static | stringify | Serializes a value as JSON. |