Greetings. I'm getting the following error:
[
{
"message": "Invalid type. Expected Object but got Array.",
"lineNumber": 0,
"linePosition": 0,
"path": "",
"schemaId": "#",
"errorType": "type",
"childErrors": []
}
]
The Sample Schema is:
{
"type": "object",
"properties": {
"body": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"type_id": {
"type": "integer"
},
"external_id": {},
"parent_id": {
"type": "integer"
},
"parent_external_id": {}
},
"required": [
"id",
"name",
"type_id",
"external_id",
"parent_id",
"parent_external_id"
]
}
}
}
}
And the actual JSON I'm trying to parse, returned from a 3rd Party API, is:
{
"body": [
{
"id": 123456,
"name": "ItemName",
"type_id": 654321,
"external_id": null,
"parent_id": 0,
"parent_external_id": null
}
]
}
There's got to be a way to fix this, but I can't seem to figure it out. Thanks in advance for any advice.