The data array contains many a and b and c. And no other kinds of objects. If count0, data should be an empty array .From the JSON schema spec, section 5.5. items: When this attribute value is an array of schemas and the instance value is an array, each position in the instance array MUST From the JSON schema spec, section 5.5. items: When this attribute value is an array of schemas and the instance value is an array, each position in the instance array MUST conform to the schema in the corresponding position for this array. This called tuple typing. Your schema definition requires the first You have defined your schema correctly, except that it doesnt match the data you say you are validating. If you change the property names to match the schema, you still have one issue. If you want to allow "toll" and "message" to be null, you can do the following. "type": " array", "items": "type" I have this schema for a json response.I think the schema is validated against the array and the objects in the array are not validated. Google Apps email administration guide. JSON Schema Cheatsheet. List of git tips.Flat Out (1). Liero Xtreme (1). Custom built (1).The hyper-schema adds stuff to describe the links between objects. It adds a links array property to the top-level schema, each of which is an object containing JSON-schema is always an object. Its properties are called keywords.That means that any data that is not of type string is valid according to the schema above—numbers, arrays, objects, boolean, and even null. This function receives object to be converted to JSON schema and optional array of properties that should be considered required in resulting schema.
Custom function from example bellow extracts only a and b properties from input object and makes b property required Type is omitted in schema to be able to validate input object: const arr [33, str, 55] const schema toJsonSchema(arr, arrays: mode: all)Custom function from example bellow converts any string of object containing string to JSON schema and if strings content is date than sets the format What is the correct schema that conforms to JSON Schema Draf-4 which represents the below data?You actually only have one line in the wrong place, but that one line breaks the whole schema. "person" is a property of the object and thus must be under the properties keyword. I would like to validate that a property called "foo" contains an array of "bar" objects.var json "foo" : 2 Passes event though foo should be an array. Below is the full code. var should require("should") var validator require("tv4")  Object value found, but an array is required.