JsonObject class

Holds an unmodifiable JSON object

This object implements the equality operator, base64 (de)serialization and convenient methods to get typed properties.

Implementers

Constructors

JsonObject.decode(String encodedString)
Constructs a JsonObject from a base64 encodedString representation of the json string
JsonObject.from(Map<String, dynamic>? json)
Constructs a JsonObject from a json map.
JsonObject.fromBytes(List<int> bytes)
Constructs a JsonObject from a bytes representation of the json string

Properties

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

Methods

getTyped<T>(String key, {T factory(dynamic v)?}) → T?
Returns the property key as a typed object
getTypedList<T>(String key, {T factory(dynamic v)?}) List<T>?
Returns the property key as a typed list
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toBase64EncodedString() String
Returns the base64 representation
toBytes() List<int>
Returns the bytes representing the encoded JSON
toJson() Map<String, dynamic>
Returns a JSON representation
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override
operator [](String key) → dynamic
Returns the property key as a core dart value