@Test public void configSoItFails() { ObjectMapper jom = new ObjectMapper(); jom.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, true); JacksonObjectMapper j = new JacksonObjectMapper(jom); try { j.readValue("{\"something\": [1,2,3] }", TestMe.class); fail("Should have thrown"); }catch (Exception e) { assertEquals("com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field \"something\" (class kong.unirest.jackson.JacksonObjectMapperTest$TestMe), not marked as ignorable (3 known properties: \"another\", \"text\", \"nmbr\"])\n" + " at [Source: (String)\"{\"something\": [1,2,3] }\"; line: 1, column: 16] (through reference chain: kong.unirest.jackson.JacksonObjectMapperTest$TestMe[\"something\"])", e.getMessage()); } }
@Override public <T> T readValue(String value, Class<T> valueType) { try { return om.readValue(value, valueType); } catch (IOException e) { throw new UnirestException(e); } }
JacksonObjectMapper implements ObjectMapper { @Override public <T> T readValue(String value, Class<T> valueType) { try { return om.readValue(value, valueType); } catch (IOException e) { throw new UnirestException(e); } } }
JacksonObjectMapper implements ObjectMapper { @Override public <T> T readValue(String value, Class<T> valueType) { try { return om.readValue(value, valueType); } catch (IOException e) { throw new UnirestException(e); } } JacksonObjectMapper();  JacksonObjectMapper(com.fasterxml.jackson.databind.ObjectMapper om); }
JacksonObjectMapper implements ObjectMapper { @Override public <T> T readValue(String value, Class<T> valueType) { try { return om.readValue(value, valueType); } catch (IOException e) { throw new UnirestException(e); } } JacksonObjectMapper();  JacksonObjectMapper(com.fasterxml.jackson.databind.ObjectMapper om); @Override T readValue(String value, Class<T> valueType); @Override T readValue(String value, GenericType<T> genericType); @Override String writeValue(Object value); }
JacksonObjectMapper implements ObjectMapper { @Override public <T> T readValue(String value, Class<T> valueType) { try { return om.readValue(value, valueType); } catch (IOException e) { throw new UnirestException(e); } } JacksonObjectMapper();  JacksonObjectMapper(com.fasterxml.jackson.databind.ObjectMapper om); @Override T readValue(String value, Class<T> valueType); @Override T readValue(String value, GenericType<T> genericType); @Override String writeValue(Object value);  }