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