Im trying to use json schema, here with a simple example. Im using the site: http://www.jsonschemavalidator.net/
Schema:
{
'Foods':
{
'type': 'array',
'items':
{
'GoodFoods': { 'type':'string' },
'NastyFoods': { 'type':'string' },
'BlendFoods': { 'type': 'string' }
},
'required': ['BlendFoods'],
}
}
Input JSON:
{
"Foods":
[
{
"GoodFoods": "Pasta",
"NastyFoods": true,
}
]
}
The idea here is that it should complain that "BlendFoods" property is missing and that the NastyFoods is a boolean not a string. But instead it says "No errors found. JSON Validates against the schema". That is not what I want.
I tried so much with this but cant figure out what Im doing wrong in the schema, any ideas?
Best regards Rob