private static TensorAddress readAddress(TokenBuffer buffer, TensorType type) {
        expectObjectStart(buffer.current());
        TensorAddress.Builder builder = new TensorAddress.Builder(type);
        int initNesting = buffer.nesting();
        for (buffer.next(); buffer.nesting() >= initNesting; buffer.next())
            builder.add(buffer.currentName(), buffer.currentText());
        expectObjectEnd(buffer.current());
        return builder.build();
    }
Reads a tensor value directly at the root, where the format is decided by the tensor type.
document/src/main/java/com/yahoo/document/json/readers/TensorReader.java