CouchDB stores documents which are represented in json.
To add your json string to the document, add an "_id" attribute that has a string as the name of the document. I will call this document "my_json" for this example.
Then use whatever http library you have (I will use the curl
utility) to POST the json to the database.
curl -X POST -H "Content-Type: application/json" -d '{"_id": "my_json", "array":[1,2,3], "boolean": true, "null": null,"number": 123, "object": {"a": "b","c": "d", "e": "f"},"string": "Hello World"}' "http://localhost:5984/example"
This will create a doc called "my_json" that is in the "example" database in the server running on localhost port 5984.
You should then get a response from the server that looks something like this:
{"ok":true,"id":"my_json","rev":"1-03c9094bea172b21e23502b82cc6e7ca"}
(Your "rev" number will be different.)
For more information on the http api for CouchDB see the docs or the getting started page.