const classafJson::Json
sys::Obj afJson::Json
@Js
A simple, easy to use JSON class.
- converters
const JsonConverters convertersThe JSON converters.
- fromJson
Obj? fromJson(Str? json, Type fantomType)Converts a JSON string to the given Fantom type.
- make
new make([Type:JsonConverter]? converters := null, [Str:Obj?]? options := null)Creates a JSON instance.
- prettyPrint
Str prettyPrint(Obj? fantomObj, Obj? options := null)Pretty prints the given JSON string or object.
- toJson
Str toJson(Obj? fantomObj, Obj? options := null)Converts the given Fantom object to its JSON string representation.
optionsis passed toJsonWriter, so may just betruefor pretty printing.