You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Dmitry Yakimov <su...@activekitten.com> on 2010/08/17 19:33:49 UTC

small fix to couch.js and question

Hi,

It seems that in couch.js in this.bulkSave function:

this line:     var newUuids = CouchDB.newUuids(docs.length);
should be like that:     var newUuids = CouchDB.newUuids(newCount);

And a question - how can I use double quotes in request by key:

something like that does not work: ?startkey="bla\"bla"
it gives me invalid JSON. The reason that some of my keys contains double  
quotes. It is possible in couchDB?

Best Regards,
Dmitry Yakimov

Re: small fix to couch.js and question

Posted by Zachary Zolton <za...@gmail.com>.
You have to URL encode the JSON (in your example "bla\"bla") for keys:
?startkey=%22bla%5C%22blah%22

I tried it via curl; it was accepted.

2010/8/17 Dmitry Yakimov <su...@activekitten.com>:
> Hi,
>
> It seems that in couch.js in this.bulkSave function:
>
> this line:     var newUuids = CouchDB.newUuids(docs.length);
> should be like that:     var newUuids = CouchDB.newUuids(newCount);
>
> And a question - how can I use double quotes in request by key:
>
> something like that does not work: ?startkey="bla\"bla"
> it gives me invalid JSON. The reason that some of my keys contains double
> quotes. It is possible in couchDB?
>
> Best Regards,
> Dmitry Yakimov
>