@Test
    public void testParsingOfMixedTensorOnMixedForm() {
        Tensor.Builder builder = Tensor.Builder.of(TensorType.fromSpec("tensor(x{},y[3])"));
        builder.cell().label("x", 0).label("y", 0).value(2.0);
        builder.cell().label("x", 0).label("y", 1).value(3.0);
        builder.cell().label("x", 0).label("y", 2).value(4.0);
        builder.cell().label("x", 1).label("y", 0).value(5.0);
        builder.cell().label("x", 1).label("y", 1).value(6.0);
        builder.cell().label("x", 1).label("y", 2).value(7.0);
        Tensor expected = builder.build();

        String mixedJson =
                """
                {
                  "blocks":[
                    {"address":{"x":"0"},"values":[2.0,3.0,4.0]},
                    {"address":{"x":"1"},"values":[5.0,6.0,7.0]}
                  ]
                }
                """;
        Tensor tensor = assertTensorField(expected,
                                          createPutWithTensor(inputJson(mixedJson), "mixed_tensor"), "mixed_tensor");
        assertTrue(tensor instanceof MixedTensor); // this matters for performance

        String mixedJsonDirect =
                """
                [
                  {"address":{"x":"0","y":"0"},"value":2.0},
                  {"address":{"x":"0","y":"1"},"value":3.0},
                  {"address":{"x":"0","y":"2"},"value":4.0},
                  {"address":{"x":"1","y":"0"},"value":5.0},
                  {"address":{"x":"1","y":"1"},"value":6.0},
                  {"address":{"x":"1","y":"2"},"value":7.0}
                ]
                """;
        Tensor tensorDirect = assertTensorField(expected,
                                                createPutWithTensor(inputJson(mixedJsonDirect), "mixed_tensor"), "mixed_tensor");
        assertTrue(tensorDirect instanceof MixedTensor); // this matters for performance
    }
Tests parsing of various tensor values set at the root, i.e. no 'cells', 'blocks' or 'values'
document/src/test/java/com/yahoo/document/json/JsonReaderTestCase.java