@Test
  public void testChar() throws Exception {
    Properties props = new Properties();
    props.setProperty(serdeConstants.LIST_COLUMNS, "a");
    props.setProperty(serdeConstants.LIST_COLUMN_TYPES, "char(5)");
    props.setProperty(serdeConstants.TIMESTAMP_FORMATS, "millis");

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

    List<?> results = (List<?>) serde.deserialize(new Text("{\"a\":\"xxx\"}"));
    Assert.assertNotNull(results);
    Assert.assertEquals(1, results.size());
    Assert.assertEquals("xxx  ", results.get(0).toString());
  }
Test when a map has a key defined as a numeric value. Technically, JSON
does not support this because each key in a map must be a quoted string.
Unquoted strings (hence an int value) is allowed by JavaScript, but not by
JSON specification. For Hive, the int map key type is stored as a string
and must be converted back into an int type.
serde/src/test/org/apache/hadoop/hive/serde2/TestJsonSerDe.java