Open amotzte opened 6 years ago
Reproduce
json={ "common": { "availability": [ undefined ] } } schema= { "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "properties": { "common": { "type": "object", "properties": { "availability": { "type": "array", "items": { "type": "object", "properties": { "localeId": {"type": "string"}, "startDateTime": {"type": "string", "format": "date-time"}, "endDateTime": {"type": "string", "format": "date-time"} }, "required": [ "localeId", "startDateTime", "endDateTime" ] } },}}} } const validate = require('jsonschema').validate; resValidate = validate(json, schema); > resValidate.valid true // Expected to be false
Technically, undefined is not a valid JSON value; so the behavior is undefined. What should the behavior be?
undefined
Reproduce