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

Source

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 the ObjConverter implementation, which is true by default.

converter

Source

const JsonConverter converter

The converter used to convert this object.

field

Source

Field? field()

The field, if any, this meta corresponds to.

implType

Source

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

Source

new make(|This f)

Standard it-block ctor for setting const fields.

meta := JsonTypeMeta {
    it.type      = MyType#
    it.converter = MyTypeConverter()
}
method

Source

Method? method()

The method, if any, this meta corresponds to.

properties

Source

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

Source

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

Source

const Slot? slot

The slot, if any, this meta corresponds to.

stash

Source

const Obj? stash

Optional stash of data for use by custom converters.

storeNullValues

Source

const Bool? storeNullValues

Dictates whether or not null values are persisted in JSON objects.

If null then the decision is deferred to the ObjConverter implementation, which is false by default.

Note that the null check is performed on the JSON value after any conversion.

type

Source

const Type type

The fantom Type being converted.