JsonModelSerializer class Get started Configuration

A class that serializes and deserializes JSON objects to and from Dart classes.

Constructors

JsonModelSerializer({Iterable<JsonDeserializerOf<Object>> deserializers = const [], bool addListSerializer = true})

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addDeserializers(Iterable<JsonDeserializerOf<Object>> deserializers, {bool addListSerializer = true}) → void
apply(JsonModelSerializer serializer) → void
contains<T>() bool
deserialize<T>(Object? json) → T?
deserializeAsync<T>(String body) FutureOr<T?>
getDeserializer<T>() FromJsonCallback<T>
merge([JsonModelSerializer? other]) JsonModelSerializer
Creates and returns a new copy of JsonModelSerializer which includes serializers from both this and other.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeDeserializer<T extends Object>([bool removeAssociatedListDeserializer = true]) JsonDeserializerOf<T>?
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

common JsonModelSerializer
A common JsonModelSerializer.
final