Http.jsondecode has problem with valid JSON? - SOLVED

I’m using http.get to fetch JSON from a server, and the JSON object validates fine over on http://jsonlint.com. However, the http.jsondecode function just throws the error “Invalid JSON”.

Here is the raw response:
{"api_key":"xxx","created_at":"2014-05-11T22:29:20Z","id":85,"name":"Location meter","updated_at":"2014-05-11T22:29:20Z","user_id":3,"calculated_nearness":0}
What am I missing?

EDIT: Apparently to run http.jsondecode against the body of the server response… Doh!

I was going to say - the json string checks out OK for me… but it sounds like you figured it out :slight_smile: