runtime/serializer library

Classes

DefaultSerializer<T>
Default Serializer that handles basic types and nested CrystallisData.. See serialize and deserialize functions for details.
MapSerializer<K, V>
A Serializer for maps with keys of type K and values of type V.
Serializable<I, O>
Specifies a custom serializer/deserializer annotation for a field Converts between type I (the field type) and type O (the serialized type)
Serializer<I, O>
Abstract base class for custom serializers. See Serializable and FieldMetadata.serializer for details.

Constants

fallbackSerializer → const Serializable
A Serializer that uses serializeValue and _fallbackDeserializeValue for serialization and deserialization.
kSupportedPrimitiveTypes → const Set<Type>
List of supported primitive types for serialization/deserialization

Functions

deserializeMap<K, V>(Map map) Map<K, V?>
Deserializes a Map by its respective key and value types
deserializeValue<T>(dynamic value) → T
Basic deserialization function. Handles:
fallbackDeserializeValue<T>(dynamic value) → T?
test-only alias for _fallbackDeserializeValue
isNullable<T>() bool
Returns whether the given type T is a nullable of the given non-nullable type C.
isNullableSelf<C, T>() bool
Returns whether the given type T is a nullable of the given non-nullable type C.
serializeMap<V>(Map<dynamic, V> map) Map<String, V?>
Serializes a Map to a JSON-compatible Map<String, dynamic> by converting keys to strings and recursively serializing values
serializeValue(dynamic value) → dynamic
Basic serialization function. Handles: