galileo_json_god library

A robust library for JSON serialization and deserialization.

Classes

WithSchema
Specifies a schema to validate a class with.
WithSchemaUrl
Specifies a schema to validate a class with.

Properties

debug bool
Instead, listen to logger.
read / write
logger Logger
final

Functions

deserialize(String json, {Type outputType}) → dynamic
Deserializes a JSON string into a Dart datum.
deserializeDatum(dynamic value, {Type outputType}) → dynamic
Deserializes some JSON-serializable value into a usable Dart value.
deserializeJson(String s, {Type outputType}) → dynamic
Deserializes JSON into data, without validating it.
serialize(dynamic value) String
Serializes any arbitrary Dart datum to JSON. Supports schema validation.
serializeMap(Map value) Map
Recursively transforms a Map and its children into JSON-serializable data.
serializeObject(dynamic value) → dynamic
Transforms any Dart datum into a value acceptable to json.encode.

Exceptions / Errors

JsonValidationError
Thrown when schema validation fails.