[ckan-dev] API: json-parser broken; Access denied
Florian Marienfeld
florian.marienfeld at fokus.fraunhofer.de
Tue Sep 20 19:08:16 UTC 2011
Have you tried adding this header to your request:
Content-Type: application/json;charset=utf-8
see http://trac.ckan.org/ticket/1312
That did the trick for us.
On 20.09.11 17:30, Pascal Christoph wrote:
> Dear all,
>
> trying to upload json (here the problematic fragment):
>
> {
> "url": "http://lobid.org/resource/data/HT002948556?output=xml"
> },
>
> results in:
> "Bad request - JSON Error: Error parsing JSON data. Error:
> ValueError('Unterminated string starting at: line 1 column 828 (char
> 828)',) JSON (Decoded and re-encoded): '{ \"extras\": "
> [...] "url\": \"http://lobid.org/resource/data/HT002948556?output'"
>
> When I try instead
> {
> "url": "http://lobid.org/resource/data/HT002948556"
> },
>
> there is no Error. As I understand the former *is* valid JSON, so there
> seems to be an error within your JSON parser.
>
> -o
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-dev
More information about the ckan-dev
mailing list