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