1

I can't figure out why this is not valid JSON after testing it with jsonlint.com. It's just an array of objects and I don't see anything missing or out of place.

[
    {
        “rel”: “self”,
        "href": "http://ourdomain/persons",
        "name": {
            "last": "best"
        }
    },
    {
        “rel”: “self”,
        "href": "http://ourdomain/persons",
        "name": {
            "last": "bet"
        }
    },
    {
        “rel”: “self”,
        "href": "http://ourdomain/persons",
        "name": {
            "last": "brown"
        }
    }
]

2 Answers 2

2

Look at the quotation marks wrapping rel and self.

[
{
    "rel": "self",
    "href": "http://ourdomain/persons",
    "name": {
        "last": "best"
    }
},
{
    "rel": "self",
    "href": "http://ourdomain/persons",
    "name": {
        "last": "bet"
    }
},
{
    "rel": "self",
    "href": "http://ourdomain/persons",
    "name": {
        "last": "brown"
    }
}

]

DONE!

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

Comments

1

The problem you've got is the quotes are being replaced with another HTML character.

If you look here “rel”: “self”, you'll noticed that it's using and not ". Replace them and you should be fine.

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.