@Test public void testConvert() throws Exception { String source = "{ \"foo\": true }"; JsonNode converted = new StringToJsonNodeConverter().convert(source); assertThat(converted.get("foo").getBooleanValue(), is(true)); }
@Override public JsonNode convert(String source) { try { return objectMapper.readValue(source, JsonNode.class); } catch (IOException e) { throw new IllegalArgumentException("Could not convert to JsonNode: " + source, e); } }
StringToJsonNodeConverter implements Converter<String, JsonNode> { @Override public JsonNode convert(String source) { try { return objectMapper.readValue(source, JsonNode.class); } catch (IOException e) { throw new IllegalArgumentException("Could not convert to JsonNode: " + source, e); } } }
StringToJsonNodeConverter implements Converter<String, JsonNode> { @Override public JsonNode convert(String source) { try { return objectMapper.readValue(source, JsonNode.class); } catch (IOException e) { throw new IllegalArgumentException("Could not convert to JsonNode: " + source, e); } }  }
StringToJsonNodeConverter implements Converter<String, JsonNode> { @Override public JsonNode convert(String source) { try { return objectMapper.readValue(source, JsonNode.class); } catch (IOException e) { throw new IllegalArgumentException("Could not convert to JsonNode: " + source, e); } }  @Override JsonNode convert(String source); }
StringToJsonNodeConverter implements Converter<String, JsonNode> { @Override public JsonNode convert(String source) { try { return objectMapper.readValue(source, JsonNode.class); } catch (IOException e) { throw new IllegalArgumentException("Could not convert to JsonNode: " + source, e); } }  @Override JsonNode convert(String source);  }