@Test public void testReorderFields() throws Exception { String w = "{\"type\":\"record\",\"name\":\"R\",\"fields\":" +"[{\"type\":\"long\",\"name\":\"l\"}," +"{\"type\":{\"type\":\"array\",\"items\":\"int\"},\"name\":\"a\"}" +"]}"; Schema ws = Schema.parse(w); DecoderFactory df = DecoderFactory.get(); String data = "{\"a\":[1,2],\"l\":100}{\"l\": 200, \"a\":[1,2]}"; JsonDecoder in = df.jsonDecoder(ws, data); Assert.assertEquals(100, in.readLong()); in.skipArray(); Assert.assertEquals(200, in.readLong()); in.skipArray(); } }