Code example for JsonArray

    	// save json (Gson object) 
    	JsonObject json = new JsonObject();
		json.addProperty("_id", generateUUID());
		json.add("an-array", new JsonArray());; 
		// save in batch mode 
		dbClient.batch(new Foo()); 
	public void testBulkDocuments() { 
		System.out.println("------------------------------- Testing Bulk Documents");
		// Bulk - Modify docs 
		List<Object> newDocs = new ArrayList<Object>();
		newDocs.add(new Foo());
		newDocs.add(new JsonObject());
Connect your IDE to all the code out there  Get Codota for Java