private Document docFromJson(String json) throws IOException {
        JsonReader r = createReader(json);
        DocumentParseInfo parseInfo = r.parseDocument().get();
        DocumentType docType = r.readDocumentType(parseInfo.documentId);
        DocumentPut put = new DocumentPut(new Document(docType, parseInfo.documentId));
        new VespaJsonDocumentReader(false).readPut(parseInfo.fieldsBuffer, put);
        return put.getDocument();
    }
Basic test of JSON streams to Vespa document instances.

@author Steinar Knutsen
@author bratseth
document/src/test/java/com/yahoo/document/json/JsonReaderTestCase.java