Creating JSON Documents in Java OJAI There are several ways to create JSON documents in your Java OJAI application. They all require you to call the Connection.newDocument method to create a Document object.