facet classafJson::JsonProperty

sys::Obj
  afJson::JsonProperty : sys::Facet

@Js
@Serializable

Marks a field as a property of a JSON document.

converterType

Source

const Type? converterType

Use to name a custom JSON <-> Fantom Converter. The type should extend JsonConverter.

The converter should have a no-args ctor or, if using IoC, a ctor suitable for autobuild.

implType

Source

const Type? implType

The implementation Type to use when instantiating this object. Use when this field references a mixin or a superclass.

Defaults to the field type.

propertyName

Source

const Str? propertyName

Name of the JSON object property this field maps to.

Defaults to the field name.

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.