Serializers constructor

Serializers()

Default Serializers that can serialize primitives and collections.

Use toBuilder to add more serializers.

Implementation

factory Serializers() {
  return (SerializersBuilder()
        ..add(BigIntSerializer())
        ..add(BoolSerializer())
        ..add(BuiltListSerializer())
        ..add(BuiltListMultimapSerializer())
        ..add(BuiltMapSerializer())
        ..add(BuiltSetSerializer())
        ..add(BuiltSetMultimapSerializer())
        ..add(DateTimeSerializer())
        ..add(DoubleSerializer())
        ..add(DurationSerializer())
        ..add(IntSerializer())
        ..add(Int32Serializer())
        ..add(Int64Serializer())
        ..add(JsonObjectSerializer())
        ..add(NullSerializer())
        ..add(NumSerializer())
        ..add(RegExpSerializer())
        ..add(StringSerializer())
        ..add(Uint8ListSerializer())
        ..add(UriSerializer())
        ..addBuilderFactory(const FullType(BuiltList, [FullType.object]),
            () => ListBuilder<Object>())
        ..addBuilderFactory(
            const FullType(
                BuiltListMultimap, [FullType.object, FullType.object]),
            () => ListMultimapBuilder<Object, Object>())
        ..addBuilderFactory(
            const FullType(BuiltMap, [FullType.object, FullType.object]),
            () => MapBuilder<Object, Object>())
        ..addBuilderFactory(const FullType(BuiltSet, [FullType.object]),
            () => SetBuilder<Object>())
        ..addBuilderFactory(
            const FullType(
                BuiltSetMultimap, [FullType.object, FullType.object]),
            () => SetMultimapBuilder<Object, Object>()))
      .build();
}