const classafJson::JsonReader
sys::Obj afJson::JsonReader
@
Js
(Service) - Reads Fantom objects from JSON.
- convertHook
virtual Obj? convertHook(Obj? val)
A simple override hook to alter values after they have been read.
By default this just returns the given value.
- readList
Translates the given JSON to a Fantom
List
.Convenience for
(Obj?[]?) readObj(...)
- readMap
[Str:Obj?]? readMap(Str? json)
Translates the given JSON to a Fantom
Map
.Convenience for
([Str:Obj?]?) readObj(...)
- readObj
Translates the given JSON to a Fantom
Obj
.Convenience for
readObjFromStream(json?.in)
- readObjFromStream
Obj? readObjFromStream(InStream? in, Bool closeStream := true)
Reads an object from the given JSON stream and returns one of the following:
null
Bool
Int
Float
Str
Str:Obj?
Obj?[]