JsonTypeObject<T> class
Constructors
Properties
-
annotations
→ List<
TypeAnnotation> -
Metadata annotations which alter (de)serialization of this node.
finalinherited
-
data
→ Map<
String, JsonNode> -
The JSON data of type T.
finalinherited
- formattingOptions ↔ JsonFormattingOptions
-
Get JSON formatting options which returns standardJsonFormatting if not set.
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → String
-
The JSON key (tag name).
finalinherited
- keyToString → String Function(T)
-
Convert enumerated key to String value.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stringify → String
-
Convert to (standard) formatted JSON String.
no setterinherited
- toTypedKey → T Function(String)
-
Convert String key to enumerated value.
final
Methods
-
array<
T> (String key, {T decodeFromJsonObject(JsonObject)?, Function? decoder, List? childType}) → List< T> -
Get List with child
T
by String key.inherited -
arrayNode<
T> (String key, {T decodeFromJsonObject(JsonObject)?, Function? decoder, List? childType}) → JsonArray< List< T> > -
Get JsonArray by String key.
inherited
-
arrayNodeOrNull<
T> (String key, {Function? decoder, List? childType}) → JsonArray< List< ?T> > -
Get JsonArray or null by String key.
inherited
-
arrayOrNull<
T> (String key, {Function? decoder, List? childType}) → List< T> ? -
Get List with child
T
or null by String key.inherited -
boolean(
String key) → bool -
Get bool by String key.
inherited
-
booleanNode(
String key) → JsonBoolean -
Get JsonBoolean by String key.
inherited
-
booleanNodeOrNull(
String key) → JsonBoolean? -
Get JsonBoolean or null by String key.
inherited
-
booleanOrNull(
String key) → bool? -
Get bool or null by String key.
inherited
-
byKey(
String key) → JsonNode -
Get JsonNode by String key.
inherited
-
float(
String key) → double -
Get double by String key.
inherited
-
floatNode(
String key) → JsonFloatingNumber -
Get JsonFloatingNumber by String key.
inherited
-
floatNodeOrNull(
String key) → JsonFloatingNumber? -
Get JsonFloatingNumber or null by String key.
inherited
-
floatOrNull(
String key) → double? -
Get double or null by String key.
inherited
-
getDataAsMap<
R> () → Map< String, R> -
Return raw (unwrapped) object data as Map<String, R>
where R is not of type JsonNode but a dart StandardType (String, bool, etc).
inherited
-
getDataAsTypedMap<
T, R> ({required T toTypedKey(String), R toTypedValue(dynamic)?}) → Map< T, R> -
Return raw (unwrapped) object data as Map<String, R>
where R is not of type JsonNode but a dart StandardType (String, bool, etc).
inherited
-
hasKey(
String key) → bool -
Returns true if JSON content contains key.
inherited
-
integer(
String key) → int -
Get int by String key.
inherited
-
integerNode(
String key) → JsonIntegerNumber -
Get JsonIntegerNumber by String key.
inherited
-
integerNodeOrNull(
String key) → JsonIntegerNumber? -
Get JsonIntegerNumber or null by String key.
inherited
-
integerOrNull(
String key) → int? -
Get int or null by String key.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
object<
R> (String key) → Map< String, R> -
Get Map<String,R> by String key.
inherited
-
objectNode(
String key) → JsonObject -
Get JsonObject by String key.
inherited
-
objectNodeOrNull(
String key) → JsonObject? -
Get JsonObject or null by String key.
inherited
-
objectOrNull<
R> (String key) → Map< String, R> ? -
Get Map<String,R> by String key.
inherited
-
string(
String key) → String -
Get String by String key.
inherited
-
stringifyWithFormatting(
JsonFormattingOptions options) → String -
Convert to (custom) formatted JSON String.
inherited
-
stringNode(
String key) → JsonString -
Get JsonString by String key.
inherited
-
stringNodeOrNull(
String key) → JsonString? -
Get JsonString or null by String key.
inherited
-
stringOrNull(
String key) → String? -
Get String or null by String key.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
typedObject<
T, R> ({required String key, required T toTypedKey(String), R toTypedValue(dynamic)?}) → Map< T, R> -
Get Map<T,R> by String key.
inherited
-
typedObjectOrNull<
T, R> ({required String key, required T toTypedKey(String), R toTypedValue(dynamic)?}) → Map< T, R> ? -
Get Map<T,R> by String key.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
fromTypedMap<
T> ({required Map< T, dynamic> data, required String keyToString(T), required T toTypedKey(String), String key = ""}) → JsonObject -
Construct a new JsonObject where each key is an enumerated value.
override