const mixinafJson::Json
afJson::Json
@
Js
(Service) - A one-stop shop for all your JSON mapping needs!
- inspectors
abstract JsonTypeInspectors inspectors()
Returns the underlying
JsonTypeInspectors
.- make
static new make(JsonTypeInspectors inspectors := ...)
Creates a new
Json
instance with the given inspectors.- readEntity
abstract Obj? readEntity(Str? json, Type fantomType)
Reads the the given JSON and converts it to a Fantom entity instance.
- writeEntity
abstract Str writeEntity(Obj? fantomObj, Type? fantomType := null)
Converts the given entity to JSON.
If
fantomType
isnull
it defaults to the type of the given obj.