private static void decodeMaybeNestedValuesInBlock(Inspector arrayField, double[] target, MutableInteger index) {
        if (arrayField.entries() == 0) {
            throw new IllegalArgumentException("The block value array does not contain any values");
        }
        arrayField.traverse((ArrayTraverser) (__, value) -> {
                if (value.type() == Type.ARRAY) {
                    decodeMaybeNestedValuesInBlock(value, target, index);
                } else {
                    target[index.next()] = decodeNumeric(value);
                }
            });
    }
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