JsonSchemaValidator

Rico Suter edited this page Sep 21, 2018 · 2 revisions

Usage:

var data = "{...}";
var schema = await JsonSchema4.FromJsonAsync("{...}");
var validator = new JsonSchemaValidator();
var result = validator.Validate(data, schema);

If you don't need to customize the validator, you can just call the Validate() method on the schema:

var data = "{...}";
var schema = await JsonSchema4.FromJsonAsync("{...}");
var result = schema.Validate(data);

The method Validate(jsonData, schema) returns a collection of validation errors or throws a JsonReaderException exception if the JSON data cannot be processed.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.