@Test
  public void testMoreComplexType() throws Exception {
    Properties props = new Properties();
    props.setProperty(serdeConstants.LIST_COLUMNS, "data," + "messageId," + "publish_time," + "attributes");
    props.setProperty(serdeConstants.LIST_COLUMN_TYPES, "string," + "string," + "bigint," + "string");

    JsonSerDe serde = new JsonSerDe();
    serde.initialize(new Configuration(), props, null, false);
    final String jsonText = loadJson("nested_sample_2.json");

    final Text text = new Text(jsonText);
    final List<?> results = (List<?>) serde.deserialize(text);

    Assert.assertEquals(4, results.size());
    Assert.assertEquals("{\"H\":{\"event\":\"track_active\",\"platform\":\"Android\"},"
        + "\"B\":{\"device_type\":\"Phone\",\"uuid\":"
        + "\"[36ffec24-f6a4-4f5d-aa39-72e5513d2cae,11883bee-a7aa-4010-8a66-6c3c63a73f16]\"}}", results.get(0));
    Assert.assertEquals("2475185636801962", results.get(1));
    Assert.assertEquals(1622514629783L, results.get(2));
    Assert.assertEquals("{\"region\":\"IN\"}", results.get(3));
  }
Test suite for the JSON SerDe class.
serde/src/test/org/apache/hadoop/hive/serde2/TestJsonSerDe.java