const classafJson::Json
sys::Obj afJson::Json
@Js
A simple, easy to use JSON class.
- converters
- const JsonConverters converters- The JSON converters. 
- fromJson
- Obj? fromJson(Str? json, Type? fantomType)- Converts a JSON string to the given Fantom entity type. If - fantomTypeis- null, then- nullis always returned.
- 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 entity object to its JSON string representation. - optionsis passed to- JsonWriter, so may just be- truefor pretty printing.
- withPickleMode
- This withPickleMode(Bool on := true)- Creates a new Json instance (based on this one) but with the given - pickleMode.- Pickle Mode is where all non-transient fields are converted, regardless of any - @JsonPropertyfacets. Data from- @JsonPropertyfacets, however, are still honoured if defined.- syntac: fantom json := Json().withPickleMode