SerializationManager class abstract
The SerializationManager is responsible for creating objects from a serialization, but also for serializing objects. This class is typically extended by generated code.
- Implementers
Constructors
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
-
decode<
T> (String data, [Type? t]) → T -
Decodes the provided json String to an object of type
t
orT
. -
decodeWithType(
String data) → Object? - Decodes the provided json String if it has been encoded with encodeWithType.
-
deserialize<
T> (dynamic data, [Type? t]) → T -
Deserialize the provided json
data
to an object of typet
orT
. -
deserializeByClassName(
Map< String, dynamic> data) → dynamic -
Deserialize the provided json
data
by using the className stored in thedata
. -
encodeWithType(
Object object, {bool formatted = false}) → String -
Encode the provided
object
to a json-formatted String, include class name so that it can be decoded even if th class is unknown. Ifformatted
is true, the output will be formatted with two spaces indentation. -
getClassNameForObject(
Object data) → String? - Get the className for the provided object.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
wrapWithClassName(
Object data) → Map< String, dynamic> - Wraps serialized data with its class name so that it can be deserialized with deserializeByClassName.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited