Json class

decorator used to influence json serialization for fields

Constructors

Json({String name = "", Type? converter, bool ignore = false, bool includeNull = true, bool required = true, Object? defaultValue})
Create a Json name name override ignore if true, this field will not be serialized includeNull if true, nulls will be serialized. required if true, the JSON is expected to have a value defaultValue default in case of a not supplied json value
const

Properties

converter Type?
final
defaultValue Object?
final
hashCode int
The hash code for this object.
no setterinherited
ignore bool
final
includeNull bool
final
name String
final
required bool
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

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