[forwarded to users as well]
CouchDB is using JSON as document format, only that it needs to be
stringified to be compatible with AJAX POST method (at least this is the
look like this:
Just take care for x-origin permissions if you use another web server.
Another option would be using directly JSON by setting the header
"Content-Type" to "application/json" and data to myJSON.
I admit I never tried any of them directly with CouchDB web server because
I was using two-layer design (CouchDB + dedicated web server with reverse
proxy and/or middleware), so, the code is not 100% error free (e.g., if
"/database_name" doesn't work, I think you can use
"/_utils/database.html?database_name"). But, at least, it gives you a
Don't forget about giving a name to the document and providing the revision
number if you already have a document.
On Thu, Aug 30, 2012 at 1:38 PM, lenin wrote:
> I am new in couchdb,
> please explain the steps to save json document into couchdb using javascipt
> thanks in advance,
> View this message in context:
> Sent from the CouchDB Development mailing list archive at Nabble.com.