[ckan-dev] API: json-parser broken, was: Re: API: json-parser broken; Access denied

Pascal Christoph christoph at hbz-nrw.de
Wed Sep 21 12:17:52 UTC 2011


Am 20.09.2011 17:31 schrieb Pascal Christoph:
> sorry for the misleading "Access denied" in the subject.
> oo
> Am 20.09.2011 17:30 schrieb Pascal Christoph:
>>  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.

to be more specific: using curl with "-d @" option. But curl then send the data 
as "application/x-www-form-urlencoded" , and thats just it!

I have to urlencode '+','=' etc. , and things go well.

sorry for this "bug"-report.

oo





More information about the ckan-dev mailing list