const mixinafJson::JsonConverter
afJson::JsonConverter
@Js
Implement to convert custom Fantom types to / from a JSON representation.
- fromJsonVal
- abstract Obj? fromJsonVal(Obj? jsonVal, JsonConverterCtx ctx)- Converts a JSON value to Fantom. - jsonValis nullable so converters can create empty / default objects.
- toJsonVal
- abstract Obj? toJsonVal(Obj? fantomObj, JsonConverterCtx ctx)- Converts a Fantom object to its JSON representation. - Must return a valid JSON value (or a List or Map thereof). - fantomObjis nullable so converters can create empty / default objects.