JsonValueConverter extends AbstractValueConverter<T> { @Override public T convert(String s) { try { return objectMapper.readValue(s, typeReference); } catch (IOException e) { throw new IllegalArgumentException(e); } } JsonValueConverter(TypeReference<T> typeReference); @Override T convert(String s); @Override String toString(T value);  }
@Test public void testConvert() throws Exception { Map<String, TestObject> convert = jsonValueConverter.convert("{ \"1\": { \"test\": \"foobar\" } }"); Assert.assertEquals("foobar", convert.get("1").getTest()); }