Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Invalid JSON Error on Design Documents PUT command #503

Open
Ninerian opened this Issue · 0 comments

1 participant

@Ninerian

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.