const classafJson::JsonTypeMeta
sys::Obj afJson::JsonTypeMeta
@
Js
Describes how a Fantom Type
will be converted to / and from JSON. This holds the JsonConverter
instance that will do the converting.
- allowSurplusJson
const Bool? allowSurplusJson
If this type models a JSON object, this value dictates whether or not surplus JSON values are allowed when converting it to Fantom.
If
null
then the decision is deferred to theObjConverter
implementation, which istrue
by default.- converter
const JsonConverter converter
The converter used to convert this object.
- field
Field? field()
The field, if any, this meta corresponds to.
- implType
const Type? implType
The Fantom implementation
Type
to use when instantiating this object. Use when this field references a mixin or a superclass.Taken from
@JsonProperty.implType
and defaults to the field type if not available.- make
new make(|This f)
Standard it-block ctor for setting
const
fields.meta := JsonTypeMeta { it.type = MyType# it.converter = MyTypeConverter() }
- method
Method? method()
The method, if any, this meta corresponds to.
- properties
const Slot:JsonTypeMeta properties := emptyMap
If this type models a JSON object, then this is the meta for the containing properties. Returns empty list if there are no properties.
- propertyName
const Str? propertyName
The property name used when this value is stored in a JSON object.
Taken from
@JsonProperty.propertyName
and defaults to the field name if not available.- slot
const Slot? slot
The slot, if any, this meta corresponds to.
- stash
const Obj? stash
Optional stash of data for use by custom converters.
- storeNullValues
const Bool? storeNullValues
Dictates whether or not
null
values are persisted in JSON objects.If
null
then the decision is deferred to theObjConverter
implementation, which isfalse
by default.Note that the
null
check is performed on the JSON value after any conversion.- type
const Type type
The fantom
Type
being converted.