facet classafJson::JsonProperty
sys::Obj afJson::JsonProperty : sys::Facet
Marks a field as a property of a JSON object.
- defVal
- const Obj? defVal- When converting to JSON, any Fantom value that equals this - defValwill be treated as if it were- nulland (depending on- ObjConverter) will not exist in the JSON object.- When converting from JSON, any - nullvalue will be converted to this- defVal.- This is most useful for saving marker booleans and to avoid saving empty lists and maps. 
- implType
- const Type? implType- The implementation - Typeto be instantiated should this field reference a mixin or a superclass. Used when mapping from JSON objects to Fantom objects.- Defaults to the field type. - Note that a property named - _typein the field's value overrides this- implType.
- name
- const Str? name- Name of the JSON property name this field maps to. - Defaults to the field name. 
- pickleMode
- const Bool pickleMode := false- Turns on Pickle Mode whereby all non - @Transientfields are converted, regardless of any- @JsonPropertyfacets.- Data from - @JsonPropertyfacets, however, will still honoured if defined.