JsonPathArgument class
A variable whose value is not sent by the client, but read back out of the response while it is being built.
Declared with the @jsonpath directive on a variable definition. The path
is dotted and rooted at $, so $.user.id waits until the user field has
resolved and then takes its id. Until then the variable holds this object
rather than a value; complete replaces it.
Constructors
-
JsonPathArgument(String path, VariableDefinitionContext definition, dynamic defaultValue, Map<
String, dynamic> variableValues) -
Splits
pathinto its segments.
Properties
- defaultValue → dynamic
-
The value to record when the path resolves to null.
final
- definition → VariableDefinitionContext
-
The variable definition the
@jsonpathdirective was attached to.final - hashCode → int
-
The hash code for this object.
no setterinherited
- path → String
-
The path as written,
$included.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
splitted
→ Iterable<
String> -
The path segments, without the leading
$.no setter -
variableValues
→ Map<
String, dynamic> -
The coerced variable map this argument writes itself into once completed.
final
Methods
-
complete(
dynamic value) → void -
Records
valueas this variable's value, or defaultValue if it is null. -
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