Iso8601DateTimeSerializer class
Alternative serializer for DateTime.
Install this to use ISO8601 format instead of the default (microseconds since epoch). Use SerializersBuilder.add to install it.
An exception will be thrown on attempt to serialize local DateTime instances; you must use UTC.
- Implemented types
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
- structured → bool
-
final
-
types
→ Iterable<
Type> -
The
Type
s that can be serialized.final - wireName → String
-
The wire name of the serializable type. For most classes, the class name.
For primitives and collections a lower-case name is defined as part of
the
built_json
wire format.final
Methods
-
deserialize(
Serializers serializers, Object? serialized, {FullType specifiedType = FullType.unspecified}) → DateTime -
Deserializes
serialized
.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
serialize(
Serializers serializers, DateTime dateTime, {FullType specifiedType = FullType.unspecified}) → Object -
Serializes
object
.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited