public override bool IsValid(JsonSchemaDefinitions definitions, JsonValue value, JsonSchemaCallback callback) { bool succeeded = true; foreach (JsonSchemaRule rule in rules) if (rule.IsValid(definitions, value, callback) == false) succeeded = false; return succeeded; }
public JsonSchema Load() { JsonObject root = document.Root.As<JsonObject>(); JsonSchemaRepository repository = new JsonSchemaRepository(); JsonSchemaDefinitions definitions = new JsonSchemaDefinitions(repository, root); JsonSchema schema = new JsonSchema(parser.Parse(root), definitions); return schema; }
public JsonSchema(JsonSchemaRule rule, JsonSchemaDefinitions definitions) { this.rule = rule; this.definitions = definitions; }
public abstract bool IsValid(JsonSchemaDefinitions definitions, JsonValue value, JsonSchemaCallback callback);