Serialization to/from Javascript Object Notation (JSON).
Slots
- readSource
-
Read a JSON object from the given stream and return one of the follow types:
- null
- Bool
- Int
- Float
- Str
- Str:Obj?
- Obj?[]
See
Str.in
to read from an in-memory string. - writeSource
-
static Void write(OutStream out, Obj? obj)
Write the given object as JSON to the given stream. The obj must be one of the follow:
- null
- Bool
- Num
- Str
- Str:Obj?
- Obj?[]
- simple (written as JSON string)
- serializable (written as JSON object)
- writeToStrSource
-
static Str writeToStr(Obj? obj)
Convenience for write to an in-memory string.