dart_json_mapper library

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
Enum descriptor, defines Enum possible values, mappings, defaultValue, case sensitivity, etc
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, defines Enum possible values, mappings, defaultValue, case sensitivity, etc
IJsonMapperAdapter
Abstract contract class for JsonMapper adapters implementations
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 for 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

Enums

CaseStyle
The most popular ways to combine multiple words as a single string
ConversionDirection

Constants

bigIntConverter → const BigIntConverter
dateConverter → const DateConverter
defaultCaseStyle → const CaseStyle
Default case style when not specified explicitly
defaultConverter → const DefaultConverter
defaultDeserializationOptions → const DeserializationOptions
defaultSerializationOptions → const SerializationOptions
durationConverter → const DurationConverter
enumConverterNumeric → const ConstEnumConverterNumeric
jsonConstructor → const JsonConstructor
jsonConstructor is used as a shorthand metadata w/o "()"
jsonProperty → const JsonProperty
jsonProperty is used as a shorthand metadata w/o "()"
jsonSerializable → const JsonSerializable
jsonSerializable is used for marking classes, mixins, enums as serialization / deserialization capable targets
kIsWeb → const bool
numberConverter → const NumberConverter
regExpConverter → const RegExpConverter
symbolConverter → const SymbolConverter
uint8ListConverter → const Uint8ListConverter
uriConverter → const UriConverter

Functions

capitalize(String input) String
deCapitalize(String input) String
skipPrefix(String prefix, String input, [CaseStyle? caseStyle = defaultCaseStyle]) String
Omits leading words from input when they are equal to prefix words
toWords(String input, [CaseStyle? caseStyle = defaultCaseStyle]) List<String>
Converts input of certain caseStyle to List of words
transformIdentifierCaseStyle(String source, CaseStyle? targetCaseStyle, CaseStyle? sourceCaseStyle) String
Transforms identifier from sourceCaseStyle to targetCaseStyle
typeOf<T>() Type

Typedefs

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