Collecta API - JSON format

2 views
Skip to first unread message

Shaun

unread,
Oct 27, 2010, 2:21:54 AM10/27/10
to collecta developer
Hi all..

small issue here.. i'm using the API to return JSON formatted data.

after studying it for a long time, i realised that each entity/article
is nested within the previous one.

as a result, i can't iterate the json data as is... i have to go
inside each entity, to get to the next.
(hope i'm being clear here..)

is this done intentionally, or is this a bug?

Mick Thompson

unread,
Oct 27, 2010, 2:29:24 AM10/27/10
to collecta-...@googlegroups.com
Hey Shaun,

I see that too, that is bug. 

If you use what we call "twitter compatible" api (http://developer.collecta.com/Transports/HttpTwitterApi/), just meaning that the search params and output match twitter search, it doesnt nest the output.

run your search like:


instead of:

Hope that helps and thanks for reporting the bug, we'll get that fixed.


_Mick
 

Shaun

unread,
Oct 27, 2010, 2:36:58 AM10/27/10
to collecta developer
thanks mick.

if you could kindly just drop a note here whenever this little bug is
removed.. that'll be fantastic.

and kudos on the quick replies!!!



On Oct 27, 2:29 pm, Mick Thompson <dthomp...@gmail.com> wrote:
> Hey Shaun,
>
> small issue here.. i'm using the API to return JSON formatted data.
>
>
>
> > after studying it for a long time, i realised that each entity/article
> > is nested within the previous one.
>
> > as a result, i can't iterate the json data as is... i have to go
> > inside each entity, to get to the next.
> > (hope i'm being clear here..)
>
> > is this done intentionally, or is this a bug?
>
> I see that too, that is bug.
>
> If you use what we call "twitter compatible" api (http://developer.collecta.com/Transports/HttpTwitterApi/), just meaning that
> the search params and output match twitter search, it doesnt nest the
> output.
>
> run your search like:http://api.collecta.com/search.json?q=obama&rpp=10&api_key=YOURKEY
>
> instead of:http://api.collecta.com/search?q=obama&rpp=10&api_key=YOURKEY&format=...
>
> Hope that helps and thanks for reporting the bug, we'll get that fixed.
> <http://api.collecta.com/search?q=obama&rpp=10&api_key=testing123&form...>
>
> _Mick

Mick Thompson

unread,
Nov 5, 2010, 6:59:19 PM11/5/10
to collecta-...@googlegroups.com
The nested JSON output bug has been fixed. 

For more information about the formats available see: http://developer.collecta.com/Transports/


_Mick
--
_Mick

Shaun

unread,
Nov 9, 2010, 9:56:15 PM11/9/10
to collecta developer
thank you sir!
Reply all
Reply to author
Forward
0 new messages