Malformed JSON response in GET lists/list


#1

If a specified user has not created any lists the returned JSON (decoded in PHP) is [] (square brackets) expecting a JSON object. Something wrong in the API?


#2

Have you examined the raw response? If we’re returning “[]”, that’s valid JSON for an empty set. What JSON parsing engine are you using? Perhaps it is too strict?


#3

I’m using php. So if it’s an empty array, the decoded JSON should look like:

Array()

and not “[]”.


#4

Alright. It’s was a parsing error. The raw JSON data was correct “[]”. But it is not decoded into “Array()” instead it returns a string “[]”. This issue is not related to the API itself. Thanks for the reply anyway. :smiley: