Reputation: 351
I have a Jquery ajax call which is returning the following supposedly JSON format? I would like to know if this is really a JSON format
{"rows":["0","Success - Programming Initiated"]}
I thought the JSON format is like this below
{"rows":["status_code":"0", "status_desc" : "Success - Programming Initiated"]}
Upvotes: 0
Views: 40
Reputation: 326
The easiest way to verify it is
like this
var test={"rows":["status_code":"0", "status_desc" : "Success - Programming Initiated"]}
when chrome throws error, it means that your json is incorrect.
Notice that json is combined with Array and Object,but
["status_code":"0", "status_desc" : "Success - Programming Initiated"]
is neither an Array nor an Object, So it's incorrect.it should be
{"rows" :{"status_code":"0", "status_desc" : "Success - Programming Initiated"}}
Upvotes: 1