BUG: Results in JSON is an object, but sometimes an array.

Avatar image for remyvd
remyvd

3

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#1  Edited By remyvd

When calling, for example http://www.comicvine.com/api/issue/4000-40601/?api_key=[API_KEY]&format=json, we will get the response as seen below, where results contains an object:

No Caption Provided

When makking a bad call to the api, like http://www.comicvine.com/api/issue/40601/?api_key=[API_KEY]&format=json (missing typeid), the response will be as seen below, where results is now an array. This causes problems for json-parsers. We now have to make manual parsing logic to get around this problem.

No Caption Provided