import json file to couch db-

前端 未结 7 1857
猫巷女王i
猫巷女王i 2020-12-14 04:27

If I have a json file that looks something like this:

{\"name\":\"bob\",\"hi\":\"hello\"}
{\"name\":\"hello\",\"hi\":\"bye\"}

Is there an o

7条回答
  •  爱一瞬间的悲伤
    2020-12-14 04:46

    If you are on Linux, You could write a quick shell script to POST the contents of valid json files to Couch.

    To test couch I did something like this:

    cat myFile.json | POST -sS "http://myDB.couchone.com/testDB" -c "application/json"
    

    myFile.json has the json contents I wanted to import into the database.

    Another alternative, if you don't like command line or aren't using Linux, and prefer a gui, you can use a tool like RESTClient

提交回复
热议问题