@Test(expected = IllegalArgumentException.class)
    public void testInvalidFieldBeforeFieldsFieldShouldFailParse() {
        String jsonData = """
                          [
                            {
                              "update": "id:unittest:testarray::whee",
                              "what is this": "nothing to see here",
                              "fields": {
                                "actualarray": {
                                  "add": [
                                    "person",
                                    "another person"
                                  ]
                                }
                              }
                            }
                          ]""";
        new JsonReader(types, jsonToInputStream(jsonData), parserFactory).next();
    }
Basic test of JSON streams to Vespa document instances.

@author Steinar Knutsen
@author bratseth
document/src/test/java/com/yahoo/document/json/JsonReaderTestCase.java