CURL CouchDB Replication command – Invalid JSON

Question:

I’m running the following line in curl trying to setup couchdb replication:

It keeps returning the following error:

As far as I can tell the JSON seems valid. Any ideas?

I’m also using Powershell as well.

Answer:

It happend many times to me as well. PowerShell parser (who knows why) removes quotes in the json.

So it sends it to curl like ‘{source:http://user:password@siteA.com:5984/main,target:main}’
You need to call it like this:

Look at http://pscx.codeplex.com/ module. EchoArgs might help when discovering such problems.

Source:

CURL CouchDB Replication command – Invalid JSON by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply