assertEquals("{\"a\":3}", singleJson);
// then lists
List> result = r.withType(List.class).readValue(quote(""));
assertNull(result);
}
<<<<<<< HEAD
=======
// 24-May-2012, tatu: Comment out for 2.0.x to keep tests green; leave for 2.1 to fix
/*
// [JACKSON-822]: ensure that type can be coerced
public void testTypedLists() throws Exception
{
ObjectMapper mapper = new ObjectMapper();
List list = new ArrayList();
String singleJson = mapper.writerWithType(Issue822Interface.class).writeValueAsString(new Issue822Impl());
// start with specific value case:
list.add(new Issue822Impl());
String listJson = mapper.writerWithType(new TypeReference>(){})
.writeValueAsString(list);
assertEquals("[{\"a\":3}]", listJson);
}
// [JACKSON-822]: ensure that type can be coerced
public void testTypedArrays() throws Exception
{
ObjectMapper mapper = new ObjectMapper();
assertEquals("[{\"a\":3}]", mapper.writerWithType(Issue822Interface[].class).writeValueAsString(
new Issue822Interface[] { new Issue822Impl() }));
}
*/
>>>>>>> dc65cc043479dd03dad878b22a9e5864e2e53bd7
} |