If I have a json file that looks something like this:
{\"name\":\"bob\",\"hi\":\"hello\"}
{\"name\":\"hello\",\"hi\":\"bye\"}
Is there an o
Yes, this is not valid JSON ...
To import JSON-Objects I use curl (http://curl.haxx.se):
curl -X PUT -d @my.json http://admin:secret@127.0.0.1:5984/db_name/doc_id
where my.json is a file the JSON-Object is in. Of course you can put your JSON-Object directly into couchdb (without a file) as well:
curl -X PUT -d '{"name":"bob","hi":"hello"}' http://admin:secret@127.0.0.1:5984/db_name/doc_id
If you do not have a doc_id, you can ask couchdb for it:
curl -X GET http://127.0.0.1:5984/_uuids?count=1