URI encoding in JSON results

3 views
Skip to first unread message

Jan Michelfeit

unread,
May 21, 2011, 7:26:07 PM5/21/11
to Sindice Developers
Hi,

I think I found a minor bug in Sindice API in JSON results. If you try
this query:

http://api.sindice.com/v2/search?q=http%3A%2F%2Fwww.w3.org%2F2002%2F07%2Fowl%23sameAs&qt=term&page=1&format=json

then the value "next" pointing to the second page of results is:

http://api.sindice.com/v2/search?q=http://www.w3.org/2002/07/owl#sameAs&format=json&page=2

But this will actually search for "http://www.w3.org/2002/07/owl"
instead of "http://www.w3.org/2002/07/owl#sameAs" because the resource
URI is not encoded. The same goes for "last" value etc.

Regards
Jan

Richard Cyganiak

unread,
May 22, 2011, 10:05:51 AM5/22/11
to sindi...@googlegroups.com

I just tried this and can confirm: the URI needs to be passed through urlencode() or encodeURIComponent() (or the equivalent of these functions in the language used in the Sindice API)

Best,
Richard


>
> Regards
> Jan
>
> --
> You received this message because you are subscribed to the Google
> Groups "Sindice Developers" group.
> To post to this group, send email to sindi...@googlegroups.com
> To unsubscribe from this group, send email to
> sindice-dev...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/sindice-dev?hl=en
>
> http://sindice.com http://sig.ma http://www.deri.ie

szydan

unread,
May 24, 2011, 5:56:50 AM5/24/11
to Sindice Developers
Fixed

Thanks for your feedback

Szymon

On May 22, 3:05 pm, Richard Cyganiak <rich...@cyganiak.de> wrote:
> On 22 May 2011, at 00:26, Jan Michelfeit wrote:
>
> > I think I found a minor bug in Sindice API in JSON results. If you try
> > this query:
>
> >http://api.sindice.com/v2/search?q=http%3A%2F%2Fwww.w3.org%2F2002%2F0...
>
> > then the value "next" pointing to the second page of results is:
>
> >http://api.sindice.com/v2/search?q=http://www.w3.org/2002/07/owl#same...
Reply all
Reply to author
Forward
0 new messages