JsonValidationResult class
The result of a JsonSentinel.validate call.
On success, isValid is true and errors is empty.
On failure, isValid is false and errors lists every problem found.
final result = JsonSentinel.validate(json: map, expectedTypes: schema);
if (!result.isValid) {
for (final e in result.errors) print(e);
}
Constructors
-
JsonValidationResult.failure(List<
String> errors) -
A failed result carrying
errors.factory
Properties
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
Constants
- success → const JsonValidationResult
- A successful result with no errors.