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? allowSurplusJsonIf this type models a JSON object, this value dictates whether or not surplus JSON values are allowed when converting it to Fantom.
If
nullthen the decision is deferred to theObjConverterimplementation, which istrueby default.- converter
const JsonConverter converterThe converter used to convert this object.
- field
Field? field()The field, if any, this meta corresponds to.
- implType
const Type? implTypeThe Fantom implementation
Typeto use when instantiating this object. Use when this field references a mixin or a superclass.Taken from
@JsonProperty.implTypeand defaults to the field type if not available.- make
new make(|This f)Standard it-block ctor for setting
constfields.meta := JsonTypeMeta { it.type = MyType# it.converter = MyTypeConverter() }- method
Method? method()The method, if any, this meta corresponds to.
- properties
const Slot:JsonTypeMeta properties := emptyMapIf 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? propertyNameThe property name used when this value is stored in a JSON object.
Taken from
@JsonProperty.propertyNameand defaults to the field name if not available.- slot
const Slot? slotThe slot, if any, this meta corresponds to.
- stash
const Obj? stashOptional stash of data for use by custom converters.
- storeNullValues
const Bool? storeNullValuesDictates whether or not
nullvalues are persisted in JSON objects.If
nullthen the decision is deferred to theObjConverterimplementation, which isfalseby default.Note that the
nullcheck is performed on the JSON value after any conversion.- type
const Type typeThe fantom
Typebeing converted.