// Typing is needed for enums
String json = m.writeValueAsString(new Object[] { TestEnum.A });
assertEquals("[[\"com.fasterxml.jackson.databind.jsontype.TestDefaultForEnums$TestEnum\",\"A\"]]", json);
// and let's verify we get it back ok as well:
Object[] value = m.readValue(json, Object[].class);
assertEquals(1, value.length);
assertSame(TestEnum.A, value[0]);
}
public void testSimpleEnumsAsField() throws Exception