Reputation: 73
I am working on a JSON rest API and the below payload is giving me a validation error. I am unable to find the issue. What could be the issue?
Parse error on line 11:
... "fq":[ "AA":"123140372859067",
----------------------^
Expecting 'EOF', '}', ',', ']', got ':'
JSON:
{
"responseHeader": {
"zkConnected":"true",
"status":0,
"QTime":6,
"params": {
"q":"*:*",
"start":"0",
"json":"",
"fq": [
"AA":"123140372859067",
"BB":"123140*",
"CC":"*41*"
],
"rows":"10",
"forwardedCount":"1",
"wt":"json"
}
}
}
Upvotes: 0
Views: 59
Reputation: 931
JSON arrays cannot contain properties. You need to change "fq" to be an object, or remove the property keys:
"responseHeader":{
"zkConnected":"true",
"status":0,
"QTime":6,
"params":{
"q":"*:*",
"start":"0",
"json":"",
"fq":{
"AA":"123140372859067",
"BB":"123140*",
"CC":"*41*"
},
"rows":"10",
"forwardedCount":"1",
"wt":"json"
}
}
Upvotes: 1