incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Anderson <jch...@apache.org>
Subject Re: Re: {"error":"bad_request","reason":"invalid UTF-8 JSON"}
Date Thu, 10 Dec 2009 17:28:50 GMT
On Wed, Dec 9, 2009 at 1:46 AM, Brian Candler <B.Candler@pobox.com> wrote:
> On Tue, Dec 08, 2009 at 06:08:48PM +0100, Stefan Fischer wrote:
>> Hi,
>> I added the ',' to the command:
>> curl -X PUT
>> http://xxxx.xxx.xxx:5984/albums/6e1295ed6c29495e54cc05947f18c8af
>>   -d{"title":"There is Nothing Left to Lose","artist":"Foo Fighters"}'
>>
>> Still the same problem:
>> {"error":"bad_request","reason":"invalid UTF-8 JSON"}
>
> Shell quoting is a nightmare in Windows, and I don't think there's an
> equivalent to the single-quote in Unix.

You can also put the JSON data to be uploaded into a file, and specify
the file name on the command line.

>
> You could try escaping using the caret (up-arrow):
> http://thepursuitofalife.com/escape-characters-in-windows-cmdexe/
>
> I'm not sure what actually needs escaping, so to start with, escape
> everything that's remotely non-alphanumeric:
>
>    -d^{^"title^"^: ...etc... ^}
>



-- 
Chris Anderson
http://jchrisa.net
http://couch.io

Mime
View raw message