JsonValueCodec<T> class

Default JSON-based value codec.

This uses utf8(jsonEncode(value)) and jsonDecode. It is intended as a safe default for common JSON-compatible values.

Implemented types

Constructors

JsonValueCodec()
Creates a new JsonValueCodec instance.
const

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(Uint8List bytes) → T
Decodes bytes into a value.
override
encode(T value) Uint8List
Encodes value into bytes.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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