JsonReader
@Js
class JsonReader : Obj
Read Haystack data in JSON format.
Wrap input stream
Convenience for readVal as Grid
Read a value and auto close stream
new make(InStream in, Dict? opts)
Wrap input stream. By default, the reader decodes JSON in the Haystack 4 (Hayson) format. Use the v3 option to decode JSON in the Haystack 3 format.
The following opts are supported:
v3(Marker): read JSON encoded in the Haystack 3 format
g := JsonReader(in).readGrid val := JsonReader(in, Etc.makeDict(["v3":Marker.val])).readVal
Dict : opts
virtual Grid readGrid()
Convenience for readVal as Grid
Obj? readVal(Bool close)
Read a value and auto close stream