How to store a JSON file in to CouchBase server by using java as client?

I think you can just read file content into the string and pass to to set() method. The example below taken from README file in the repository: https://github.com/couchbase/couchbase-java-client#using

List baseList = Arrays.asList(
  URI.create("http://192.168.0.1:8091/pools"),
  URI.create("http://192.168.0.2:8091/pools"));

CouchbaseClient client = new CouchbaseClient(baseList, "default", "");

OperationFuture setOp = client.set("key", "{\"name\":\"Couchbase\"}");