json_typedef_dart library

Functions

isValidSchema(Json? schema, [Json? root]) bool
isValidSchema checks whether some Schema is correct, according to the syntax rules of JSON Typedef. In particular, isValidSchema verifies that:
validate({required Json schema, required dynamic data, int maxDepth = 0, int maxErrors = 0}) → ValidationErrors
validate performs JSON Typedef validation of an instance (or "input") against a JSON Typedef schema, returning a standardized set of errors.

Typedefs

Json = Map<String, dynamic>

Exceptions / Errors

MaxDepthExceededError
Thrown when schema is too recursive.
MaxErrorsReachedError
Thrown when max errors have been produced.