JsonMapper class

Singleton class providing static methods for Dart objects conversion from / to JSON string

Constructors

JsonMapper()
factory

Properties

adapters Map<int, IAdapter>
final
classes Map<String, ClassMirror>
final
converters Map<Type, ICustomConverter>
read / write
enumValues Map<Type, List>
read / write
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
typeInfoDecorators Map<int, ITypeInfoDecorator>
read / write
valueDecorators Map<Type, ValueDecoratorFunction>
read / write

Methods

getObjectProcessed(Object object, int level) ProcessedObjectDescriptor
info() → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
removeAdapter(IAdapter adapter) JsonMapper
toString() String
Returns a string representation of this object.
inherited
useAdapter(IAdapter adapter, [int priority]) JsonMapper

Operators

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

Static Properties

instance JsonMapper
final

Static Methods

clone<T>(T object) → T
Clone Dart object of type T
copy<T>(T object) → T
Alias for clone method to copy Dart object of type T
copyWith<T>(T object, Map<String, dynamic> map) → T
Copy Dart object of type T & merge it with Map<String, dynamic>
deserialize<T>(dynamic jsonValue, [DeserializationOptions options = defaultDeserializationOptions]) → T
Converts JSON string to Dart object of type T
fromJson<T>(dynamic jsonValue, [DeserializationOptions options = defaultDeserializationOptions]) → T
Converts JSON string to Dart object of type T
fromMap<T>(Map<String, dynamic> map, [SerializationOptions options = defaultSerializationOptions]) → T
Converts Map<String, dynamic> to Dart object instance
serialize(Object object, [SerializationOptions options = defaultSerializationOptions]) → dynamic
Converts Dart object to JSON
toJson(Object object, [SerializationOptions options = defaultSerializationOptions]) → dynamic
Converts Dart object to JSON
toMap(Object object, [SerializationOptions options = defaultSerializationOptions]) Map<String, dynamic>
Converts Dart object to Map<String, dynamic>