Converters

Converters are first level serializers which convert an unserialized value into to a graph representation. Custom converter implementations can be linked via @LinkSerializer(). By default, all converters are associated with their type argument. This behaviour can be disabled by specifying isAssociated in the super constructor.

circle-check

Following converters are registered by default. (Primitive types can be converted without the need for a converter)

Converter Name
Serialized Type

PolymorphicConverter

dynamic, Object (not associated)

DefaultIterableConverter

Iterable<dynamic> (not associated)

DefaultListConverter

List<dynamic> (not associated)

DefaultSetConverter

Set<dynamic> (not associated)

DefaultMapConverter

Map<dynamic,dynamic> (not associated)

DateTimeConverter

DateTime

DurationConverter

Duration

UriConverter

Uri

Uint8List

Uint8List

Polymorphism

Dog supports first level polymorphism for all data types which are either primitive or have a registered Structures. Complex types are identified by a added _type property in the resulting DogMap. Complex types which are serialized to a graph value which is not a map are expanded into a map containing the type in _type and the converted value in _value. Properties can be marked as polymorphic by tagging the fields with @Polymorphic().

Last updated