Invalid JSON Error on Design Documents PUT command #503

Open
Ninerian opened this Issue Feb 23, 2014 · 1 comment

Comments

Projects
None yet
2 participants

While working through the official guide I discovered an error on the design document part.

After executing the command:

curl -X PUT http://127.0.0.1:5984/basic/_design/example -data-binary @mydesign.json

i got the error:

{"error":"bad_request","reason":"invalid_json"}
curl: (6) Could not resolve host: mydesign.json

the debuglog told me

Invalid JSON: {{error,
                                     {1,
                                      "lexical error: invalid char in json text.\n"}},
                                    <<"ata-binary">>}

After some searching on google i discovered the solution on stackoverflow: http://stackoverflow.com/questions/2461798/error-about-invalid-json-with-couchdb-view-but-the-jsons-fine

by changing the command to

curl -X PUT http://127.0.0.1:5984/basic/_design/example -d @mydesign.json

i was able to go further in the guide.

nkux commented Oct 20, 2016

thx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment