<PackageReference Include="NJsonSchema" Version="10.6.4" />

JsonSchemaValidator

public class JsonSchemaValidator
Class to validate a JSON schema against a given JToken.
public JsonSchemaValidator(IFormatValidator[] customValidators)

Initializes JsonSchemaValidator

public ICollection<ValidationError> Validate(string jsonData, JsonSchema schema, SchemaType schemaType = 0)

Validates the given JSON data.

public ICollection<ValidationError> Validate(JToken token, JsonSchema schema, SchemaType schemaType = 0)

Validates the given JSON token.

protected virtual ICollection<ValidationError> Validate(JToken token, JsonSchema schema, SchemaType schemaType, string propertyName, string propertyPath)

Validates the given JSON token.