dart_json_mapper library Null safety

Classes

BaseCustomConverter
Base class for custom type converter having access to parameters provided by the JsonProperty meta
BigIntConverter
BigInt converter
ClassInfo
Provides unified access to class information based on ClassMirror
ConstEnumConverterNumeric
Const wrapper for EnumConverterNumeric
DateConverter
Default converter for DateTime type
DefaultConverter
Default converter for all types
DefaultIterableConverter
Default Iterable converter
DefaultTypeInfoDecorator
DeserializationContext
Describes a set of data / state to be re-used down the road of recursive process of Deserialization/Serialization
DeserializationOptions
Declares configuration parameters for Deserialization process
DurationConverter
DurationConverter converter for Duration type
Enum
Virtual class Used as a generic reference to all Enum based types enum ABC {A, B, C}, etc.
EnumConverter
Long converter for enum type
EnumConverterNumeric
Numeric index based converter for enum type
EnumConverterShort
Default converter for enum type
EnumDescriptor
EnumDescriptor
IAdapter
Abstract contract class for adapters implementations
ICompositeConverter
Abstract class for composite converters relying on other converters
ICustomConverter<T>
Abstract class for custom converters implementations
ICustomEnumConverter
Abstract class for custom Enum converters implementations
ICustomIterableConverter
Abstract class for custom iterable converters implementations
ICustomMapConverter
Abstract class for custom map converters implementations
IEnumDescriptor
Enum descriptor, values, mappings, etc
IRecursiveConverter
Abstract class for custom recursive converters implementations
ITypeInfoDecorator
Abstract class for custom typeInfo decorator implementations
Json
Json is used as metadata, to annotate Dart class as top level Json object
JsonConstructor
JsonConstructor is used as metadata, to annotate specific Dart class constructor being used for deserialization
JsonMap
Provides logic for traversing Json object tree
JsonMapper
Singleton class providing mostly static methods for conversion of previously annotated by JsonSerializable Dart objects from / to JSON string
JsonMapperAdapter
Base class for JsonMapper adapters
JsonProperty
JsonProperty is used as metadata, for annotation of individual class fields to fine tune & configure Json property level.
JsonSerializable
JsonSerializable is used as metadata, marking classes, mixins, enums as serialization / deserialization capable targets
MapConverter
Map<K, V> converter
NumberConverter
Default converter for num type
ProcessedObjectDescriptor
Describes an Object being processed through recursion to track cycling use case. Used to prevent dead loops during recursive process
PropertyDescriptor
Describes resolved property name and value
RegExpConverter
RegExp converter
SerializationContext
Describes a set of data / state to be re-used down the road of recursive process of Serialization
SerializationOptions
Declares configuration parameters for Serialization process fully includes DeserializationOptions
SymbolConverter
Default converter for Symbol type
TypeInfo
Provides enhanced type information based on Type.toString() value
Uint8ListConverter
Uint8List converter to base64 and back
UriConverter
Uri converter

Constants

bigIntConverter → const BigIntConverter
const BigIntConverter()
dateConverter → const DateConverter
const DateConverter()
defaultConverter → const DefaultConverter
defaultDeserializationOptions → const DeserializationOptions
defaultSerializationOptions → const SerializationOptions
const SerializationOptions(indent: ' ')
durationConverter → const DurationConverter
enumConverterNumeric → const ConstEnumConverterNumeric
jsonConstructor → const JsonConstructor
jsonConstructor is used as a shorthand metadata w/o "()"
const JsonConstructor()
jsonProperty → const JsonProperty
jsonProperty is used as a shorthand metadata w/o "()"
const JsonProperty()
jsonSerializable → const JsonSerializable
jsonSerializable is used as shorthand metadata, marking classes targeted for serialization / deserialization, w/o "()"
kIsWeb → const bool
identical(0, 0.0)
numberConverter → const NumberConverter
const NumberConverter()
regExpConverter → const RegExpConverter
const RegExpConverter()
symbolConverter → const SymbolConverter
const SymbolConverter()
uint8ListConverter → const Uint8ListConverter
uriConverter → const UriConverter
const UriConverter()

Properties

dartCollectionAdapter JsonMapperAdapter
Covers support for Dart collection types
final
dartCoreAdapter JsonMapperAdapter
Covers support for Dart core types
final
defaultEnumConverter EnumConverterShort
final
defaultIterableConverter DefaultIterableConverter
final
defaultTypeInfoDecorator DefaultTypeInfoDecorator
final
enumConverter EnumConverter
final
enumConverterShort EnumConverterShort
final
mapConverter MapConverter
final

Functions

capitalize(String input) String
toWords(String input) String
transformFieldName(String? input, CaseStyle? caseStyle) String?
typeOf<T>() Type

Enums

CaseStyle
ConversionDirection

Typedefs

DeserializeObjectFunction = dynamic Function(Object object, Type type)
GetConvertedValueFunction = dynamic Function(ICustomConverter converter, dynamic value, DeserializationContext context)
GetConverterFunction = ICustomConverter? Function(JsonProperty? jsonProperty, TypeInfo typeInfo)
SerializeObjectFunction = dynamic Function(Object object)
ValueDecoratorFunction = dynamic Function(dynamic value)

Exceptions / Errors

CircularReferenceError
FieldCannotBeNullError
FieldIsRequiredError
JsonFormatError
JsonMapperError
MissingAnnotationOnTypeError
MissingTypeForDeserializationError