private static TensorAddress asAddress(String label, TensorType type) {
        if (type.dimensions().size() != 1)
            throw new IllegalArgumentException("Expected a tensor with a single dimension but got " + type);
        return new TensorAddress.Builder(type).add(type.dimensions().get(0).name(), label).build();
    }
Decodes a tensor value directly at the root, where the format is decided by the tensor type.
vespajlib/src/main/java/com/yahoo/tensor/serialization/JsonFormat.java