0

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
}

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.