I am trying to setup the following view on CouchDB
{
\"_id\":\"_design/id\",
\"_rev\":\"1-9be2e55e05ac368da3047841f301203d\",
\"language\":\"javascript\",
\"
It might be necessary to put your JSON into single quotes:
curl -vX PUT http://localhost:5984/dbname/docid -d '{"foo" : "bar"}'
works for me but
curl -vX PUT http://localhost:5984/dbname/docid -d {"foo" : "bar"}
throws the error you mention. I guess the shell somehow interferes with the data you send when you omit the single quotes.
edit: I'm using bash.