Reputation: 135
I'm trying to get this JSON to validate using http://jsonlint.com/
On their own they validate just fine. But as soon as I set two object next to each other it wont validate. Should these objects be held in an array in order to be on the same JSON or is my syntax incorrect?
{
"paWAP": 0,
"birdID": 3,
"migratoryStatus": "Neotropical",
"fallMigPeriodEnd": 0,
"birdSciName": "Setophaga ruticilla",
"birdComName": "American Redstart",
"iucnListing": "LC",
"amjvPriority": "Highest",
"springMigPeriodStart": 0,
"fallMigPeriodStart": 0,
"springMigPeriodEnd": 0,
"plantList": [
]
},
{
"paWAP": 0,
"birdID": 4,
"iucnListing": "LC",
"springMigPeriodStart": 0,
"springMigPeriodEnd": 0,
"plantList": [
],
"specPlants": "1;29;38;48;66;86;87;88;172;213;219;220;221;244;347;348;349;359;382;385",
"migratoryStatus": "Nearctic",
"fallMigPeriodEnd": 0,
"birdSciName": "Turdus migratorius",
"birdComName": "American Robin",
"amjvPriority": "None",
"fallMigPeriodStart": 0
}
Upvotes: 0
Views: 133
Reputation: 1475
If you're making a list of things (like you are making a list of two dicts here) you have to surround them in square brackets.
Your JSON file makes one object, not two or more. That object is a list, here.
Upvotes: 1