bpdusk / jsonschema

Automatically exported from code.google.com/p/jsonschema
0 stars 0 forks source link

extra code to treat schema as array found #9

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Schemas can be arrays? I undersand not, if so the following looks like
extra code used when schema could be an array (near line 60).:

if (schema instanceof Array) {
    if (!(value instanceof Array)) {
        return [{property:path,message:"An array tuple is required"}];
    }
    for (i =0; i < schema.length; i++) {
        errors2.concat(checkProp(value[i],schema[i],path,i));
    }
    return errors2;
}

Original issue reported on code.google.com by bruno.p.reis@gmail.com on 5 Dec 2008 at 7:28

GoogleCodeExporter commented 8 years ago

Original comment by kris...@gmail.com on 16 Apr 2009 at 8:38