Json class Null safety

Json is used as metadata, to annotate Dart class as top level Json object

Constructors

Json({int? allowCircularReferences, Map<Type, ValueDecoratorFunction> valueDecorators()?, dynamic scheme, String? discriminatorProperty, dynamic discriminatorValue, CaseStyle? caseStyle, bool? ignoreNullMembers, bool? processAnnotatedMembersOnly, String? name})
const

Properties

allowCircularReferences int?
Allow circular object references during serialization for annotated class. Presume You know what you are doing
final
caseStyle CaseStyle?
The most popular ways to combine words into a single string Based on assumption: That all Dart class fields initially given as CaseStyle.Camel
final
discriminatorProperty String?
Defines a class property to be used as a source of truth for discrimination logic in a hierarchy of inherited classes. Usually used on annotation of abstract class
final
discriminatorValue → dynamic
Defines a custom override value for a discriminator Usually used on annotations of subclasses, to distinguish it from each other Default value:
final
hashCode int
The hash code for this object. [...]
read-only, inherited
ignoreNullMembers bool?
Null class members will be excluded from serialization process unless JsonProperty.required or JsonProperty.notNull is given to true
final
name String?
Defines RFC 6901 JSON pointer Denotes the json Object root name/path to be used for mapping Example: name: 'foo' name: 'bar' name: 'foo/bar/baz' name: '#/foo/0/baz'
final
processAnnotatedMembersOnly bool?
Process only annotated class members
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
scheme → dynamic
Scheme marker to associate this meta information with particular mapping scheme
final
valueDecorators → (Map<Type, ValueDecoratorFunction> Function?()?)
Static function to return a Map of Inline value decorators [...]
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
override

Operators

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