public static double[] decodeHexString(String input, TensorType.Value valueType) {
        return switch (valueType) {
            case INT8 -> decodeHexStringAsBytes(input);
            case BFLOAT16 -> decodeHexStringAsBFloat16s(input);
            case FLOAT -> decodeHexStringAsFloats(input);
            case DOUBLE -> decodeHexStringAsDoubles(input);
        };
    }
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