If I have a json file that looks something like this:
{\"name\":\"bob\",\"hi\":\"hello\"}
{\"name\":\"hello\",\"hi\":\"bye\"}
Is there an o
That JSON object will not be accepted by CouchDB. To store all the data with a single server request use:
{
"people":
[
{
"name":"bob",
"hi":"hello"
},
{
"name":"hello",
"hi":"bye"
}
]
}
Alternatively, submit a different CouchDB request for each row.
Import the file into CouchDB from the command-line using cURL:
curl -vX POST https://user:pass@127.0.0.1:1234/database \
-d @- -# -o output -H "Content-Type: application/json" < file.json