lheredia/jsonschema

extra code to treat schema as array found

Closed this issue · 1 comments

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

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

  • Changed state: Fixed