@Test
  public void testComplexType() throws Exception {
    Properties props = new Properties();
    props.setProperty(serdeConstants.LIST_COLUMNS,
        "__dc_timelabel," + "__dc_load_time," + "id," + "name," + "location," + "primary_contact_user_id,"
            + "parent_id," + "parent_office_external_id," + "child_ids," + "child_office_external_ids," +"external_id");
    props.setProperty(serdeConstants.LIST_COLUMN_TYPES,
        "timestamp," + "timestamp," + "bigint," + "string," + "string," + "bigint," + "bigint," + "string," + "string,"
            + "string," + "string");
    props.setProperty(serdeConstants.TIMESTAMP_FORMATS, "yyyy-MM-ddHH:mm:ss");

    JsonSerDe serde = new JsonSerDe();
    serde.initialize(new Configuration(), props, null, false);

    final String jsonText = loadJson("nested_sample_1.json");
    final Text text = new Text(jsonText);
    final List<?> results = (List<?>) serde.deserialize(text);

    Assert.assertEquals(11, results.size());
    Assert.assertEquals("Brooklyn-200", results.get(3));
    // make sure inner struct can be decoded
    Assert.assertEquals("{\"name\":\"Brooklyn,NY\"}", results.get(4));
  }
Test suite for the JSON SerDe class.
serde/src/test/org/apache/hadoop/hive/serde2/TestJsonSerDe.java