@Test
    public void testFloatVectorInHexForm() {
        var builder = Tensor.Builder.of(TensorType.fromSpec("tensor<float>(x[3],y[4])"));
        builder.cell().label("x", 0).label("y", 0).value(42.0);
        builder.cell().label("x", 0).label("y", 1).value(1048577.0);
        builder.cell().label("x", 0).label("y", 2).value(0.00000095367431640625);
        builder.cell().label("x", 0).label("y", 3).value(-255.00);

        builder.cell().label("x", 1).label("y", 0).value(0.0);
        builder.cell().label("x", 1).label("y", 1).value(-0.0);
        builder.cell().label("x", 1).label("y", 2).value(Float.MIN_VALUE);
        builder.cell().label("x", 1).label("y", 3).value(Float.MAX_VALUE);

        builder.cell().label("x", 2).label("y", 0).value(Float.POSITIVE_INFINITY);
        builder.cell().label("x", 2).label("y", 1).value(Float.NEGATIVE_INFINITY);
        builder.cell().label("x", 2).label("y", 2).value(Float.NaN);
        builder.cell().label("x", 2).label("y", 3).value(-Float.NaN);
        Tensor expected = builder.build();

        String denseJson = "{\"values\":\""
            +"42280000"+"49800008"+"35800000"+"c37f0000"
            +"00000000"+"80000000"+"00000001"+"7f7fffff"
            +"7f800000"+"ff800000"+"7fc00000"+"ffc00000"
            +"\"}";
        Tensor decoded = JsonFormat.decode(expected.type(), denseJson.getBytes(StandardCharsets.UTF_8));
        assertEquals(expected, decoded);
        var encoded = JsonFormat.encode(decoded, new JsonFormat.EncodeOptions(true, true, true));
        assertEquals("\""
                     +"42280000"+"49800008"+"35800000"+"C37F0000"
                     +"00000000"+"80000000"+"00000001"+"7F7FFFFF"
                     +"7F800000"+"FF800000"+"7FC00000"+"FFC00000"
                     +"\"",
                     new String(encoded, StandardCharsets.UTF_8));
    }
Tests parsing of various tensor values set at the root, i.e. no 'cells', 'blocks' or 'values'
vespajlib/src/test/java/com/yahoo/tensor/serialization/JsonFormatTestCase.java