JsonProperty class

JsonProperty is used as metadata, for annotation of individual class fields to fine tune Json property level.

Constructors

JsonProperty({dynamic scheme, String name, bool ignore, bool ignoreIfNull, ICustomConverter converter, List enumValues, dynamic defaultValue, Map<String, dynamic> converterParams})
const

Properties

converter ICustomConverter
Declares custom converter instance, to be used for annotated field serialization / deserialization
final
converterParams Map<String, dynamic>
Map of named parameters to be passed to the custom converter instance
final
defaultValue → dynamic
Final field default value
final
enumValues List
Provides a way to specify enum values, via Dart built in capability for all Enum instances. Enum.values
final
hashCode int
The hash code for this object. [...]
read-only, inherited
ignore bool
Declares annotated field as ignored so it will be excluded from serialization / deserialization process
final
ignoreIfNull bool
Declares annotated field as ignored if it's value is null so it will be excluded from serialization / deserialization process
final
name String
Defines RFC 6901 JSON pointer Denotes the json property name/path to be used for mapping to the annotated field Example: name: 'foo' name: 'bar' name: 'foo/bar/baz'
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

Methods

isEnumType(Type enumType) bool
isEnumTypeForValues(Type enumType, [Iterable enumValuesList]) bool
Validate provided enumType against provided enumValues
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

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