Json class

JSON utility class.

Constructors

Json()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

defaultDecoder JsonDecoder
final
defaultEncoder JsonEncoder
final

Static Methods

boot() → void
decode<T>(String encodedJson, {Type? type, TypeInfo? typeInfo, JsomMapDecoder? jsomMapDecoder, EntityHandlerProvider? entityHandlerProvider, EntityCache? entityCache, bool? autoResetEntityCache}) → T
Decodes encodedJson to a JSON collection/data.
decodeAsync<T>(FutureOr<String> encodedJson, {Type? type, TypeInfo? typeInfo, JsomMapDecoder? jsomMapDecoder, EntityHandlerProvider? entityHandlerProvider, EntityCache? entityCache, bool? autoResetEntityCache}) FutureOr<T>
Decodes encodedJson to a JSON collection/data accepting async values.
decodeFromBytes<T>(Uint8List encodedJsonBytes, {Type? type, TypeInfo? typeInfo, JsomMapDecoder? jsomMapDecoder, EntityHandlerProvider? entityHandlerProvider, EntityCache? entityCache, bool? autoResetEntityCache}) → T
Sames as decode but from a Uint8List.
decodeFromBytesAsync<T>(FutureOr<Uint8List> encodedJsonBytes, {Type? type, TypeInfo? typeInfo, JsomMapDecoder? jsomMapDecoder, EntityHandlerProvider? entityHandlerProvider, EntityCache? entityCache, bool? autoResetEntityCache}) FutureOr<T>
Sames as decodeAsync but from a Uint8List.
decoder({JsomMapDecoder? jsomMapDecoder, EntityHandlerProvider? entityHandlerProvider, EntityCache? entityCache}) JsonDecoder
Converts o to type.
defaultFieldNameResolver(String field, Map<String, Object?> map) String?
defaultFieldValueResolver(String field, Object? value, TypeReflection type, JsonDecoder jsonDecoder, EntityHandlerProvider? entityHandlerProvider) Object?
defaultToEncodableJsonProvider([EntityHandlerProvider? entityHandlerProvider]) ToEncodableJsonProvider
encode(Object? o, {bool pretty = false, JsonFieldMatcher? maskField, String maskText = '***', JsonFieldMatcher? removeField, bool removeNullFields = false, ToEncodableJsonProvider? toEncodableProvider, ToEncodable? toEncodable, EntityHandlerProvider? entityHandlerProvider, EntityCache? entityCache, bool? autoResetEntityCache}) String
Transforms o to an encoded JSON.
encodeToBytes(Object? o, {bool pretty = false, JsonFieldMatcher? maskField, String maskText = '***', JsonFieldMatcher? removeField, bool removeNullFields = false, ToEncodableJsonProvider? toEncodableProvider, ToEncodable? toEncodable, EntityHandlerProvider? entityHandlerProvider, EntityCache? entityCache, bool? autoResetEntityCache}) Uint8List
Sames as encode but returns a Uint8List.
fromJson<T>(Object? o, {Type? type, TypeInfo? typeInfo, JsomMapDecoder? jsomMapDecoder, EntityHandlerProvider? entityHandlerProvider, EntityCache? entityCache, bool? autoResetEntityCache}) → T?
Converts o to type.
fromJsonAsync<T>(Object? o, {Type? type, TypeInfo? typeInfo, JsomMapDecoder? jsomMapDecoder, EntityHandlerProvider? entityHandlerProvider, EntityCache? entityCache, bool? autoResetEntityCache}) FutureOr<T?>
Converts o to type allowing async calls (Future and FutureOr).
fromJsonList<T>(Iterable o, {Type? type, TypeInfo? typeInfo, JsomMapDecoder? jsomMapDecoder, EntityHandlerProvider? entityHandlerProvider, EntityCache? entityCache, bool? autoResetEntityCache}) List<T?>
Converts o to as List of type.
fromJsonListAsync<T>(FutureOr<Iterable> o, {Type? type, TypeInfo? typeInfo, JsomMapDecoder? jsomMapDecoder, EntityHandlerProvider? entityHandlerProvider, EntityCache? entityCache, bool? autoResetEntityCache}) FutureOr<List<T?>>
Converts o to as List of type allowing async calls (Future and FutureOr).
fromJsonMap<T>(Map<String, Object?> map, {Type? type, TypeInfo? typeInfo, JsomMapDecoder? jsomMapDecoder, EntityHandlerProvider? entityHandlerProvider, EntityCache? entityCache, bool? autoResetEntityCache}) → T
Converts map to type.
fromJsonMapAsync<T>(FutureOr<Map<String, Object?>> map, {Type? type, TypeInfo? typeInfo, JsomMapDecoder? jsomMapDecoder, EntityHandlerProvider? entityHandlerProvider, EntityCache? entityCache, bool? autoResetEntityCache}) FutureOr<T>
Converts map to type allowing async calls (Future and FutureOr).
standardJsonMaskField(String key, {Iterable<String>? extraKeys}) bool
A standard implementation of mask filed.
toJson<T>(Object? o, {JsonFieldMatcher? maskField, String maskText = '***', JsonFieldMatcher? removeField, bool removeNullFields = false, ToEncodableJsonProvider? toEncodableProvider, ToEncodable? toEncodable, EntityHandlerProvider? entityHandlerProvider, EntityCache? entityCache, bool? autoResetEntityCache}) → T?
Converts o to a JSON collection/data.