예제 #1
0
        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;
        }
예제 #2
0
        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;
        }
예제 #3
0
파일: JsonSchema.cs 프로젝트: amacal/jinx
 public JsonSchema(JsonSchemaRule rule, JsonSchemaDefinitions definitions)
 {
     this.rule = rule;
     this.definitions = definitions;
 }
예제 #4
0
 public abstract bool IsValid(JsonSchemaDefinitions definitions, JsonValue value, JsonSchemaCallback callback);