I have a JSON response which returns all the details of the users in a company. I have converted those responses to JSON schema and kept it in a file name JSONSchema.json.
Now how do I compare all the responses with the JSON schema ? Can someone please help.
JSON Data
[ {
"Id": 2,
"Name": "Test123",
"Status": "Active"
},
{
"Id": 3,
"Name": "123Test",
"Status": "Active"
}
]
JSON Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array",
"items": [
{
"type": "object",
"properties": {
"Id": {
"type": "integer"
},
"Name": {
"type": "string"
},
"Status": {
"type": "string"
}
},
"required": [
"Id",
"Name",
"Status"
]
},
{
"type": "object",
"properties": {
"Id": {
"type": "integer"
},
"Name": {
"type": "string"
},
"Status": {
"type": "string"
}
},
"required": [
"Id",
"Name",
"Status"
]
}
]
}