@Test public void verifyIgnoresUnknownFields() throws Exception { final SomePojo somePojo = Json.read("{\"foo\":\"1\", \"bar\":\"2\"}", SomePojo.class); assertEquals("1", somePojo.foo); }
public static <T> T read(final String content, final Class<T> clazz) throws IOException { return OBJECT_MAPPER.readValue(content, clazz); }
Json { public static <T> T read(final String content, final Class<T> clazz) throws IOException { return OBJECT_MAPPER.readValue(content, clazz); } }
Json { public static <T> T read(final String content, final Class<T> clazz) throws IOException { return OBJECT_MAPPER.readValue(content, clazz); }  }
Json { public static <T> T read(final String content, final Class<T> clazz) throws IOException { return OBJECT_MAPPER.readValue(content, clazz); }  static byte[] asBytes(final Object value); static byte[] asBytesUnchecked(final Object value); static String asString(final Object value); static String asStringUnchecked(final Object value); static String asPrettyString(final Object value); static String asPrettyStringUnchecked(final Object value); static String asNormalizedString(final Object value); static String asNormalizedStringUnchecked(final Object value); static T read(final String content, final Class<T> clazz); static T read(final String content, final TypeReference<?> typeReference); static T read(final String content, final JavaType javaType); static T read(final byte[] bytes, final Class<T> clazz); static T read(final byte[] bytes, final TypeReference<?> typeReference); static T read(final byte[] bytes, final JavaType javaType); static T readUnchecked(final String content, final Class<T> clazz); static T readUnchecked(final String content, final TypeReference<?> typeReference); static T readUnchecked(final String content, final JavaType javaType); static T readUnchecked(final byte[] bytes, final Class<T> clazz); static T readUnchecked(final byte[] bytes, final TypeReference<?> typeReference); static T readUnchecked(final byte[] bytes, final JavaType javaType); static MappingIterator<Map<String, Object>> readValues(
      final InputStream stream, final TypeReference<Map<String, Object>> typeReference); static MappingIterator<JsonNode> readValues(
      final InputStream stream); static JsonNode readTree(final byte[] bytes); static JsonNode readTree(final String content); static JsonNode readTree(final File file); static JsonNode readTreeUnchecked(final byte[] bytes); static JsonNode readTreeUnchecked(final String content); static JsonNode readTreeUnchecked(final File file); static JavaType type(Type type); static JavaType type(final TypeReference<?> typeReference); static TypeFactory typeFactory(); static ObjectReader reader(); static ObjectWriter writer(); static T convert(Object from, Class<T> to); static byte[] sha1digest(final Object obj); static byte[] sha1digest(final Map<String, ?> obj); }
Json { public static <T> T read(final String content, final Class<T> clazz) throws IOException { return OBJECT_MAPPER.readValue(content, clazz); }  static byte[] asBytes(final Object value); static byte[] asBytesUnchecked(final Object value); static String asString(final Object value); static String asStringUnchecked(final Object value); static String asPrettyString(final Object value); static String asPrettyStringUnchecked(final Object value); static String asNormalizedString(final Object value); static String asNormalizedStringUnchecked(final Object value); static T read(final String content, final Class<T> clazz); static T read(final String content, final TypeReference<?> typeReference); static T read(final String content, final JavaType javaType); static T read(final byte[] bytes, final Class<T> clazz); static T read(final byte[] bytes, final TypeReference<?> typeReference); static T read(final byte[] bytes, final JavaType javaType); static T readUnchecked(final String content, final Class<T> clazz); static T readUnchecked(final String content, final TypeReference<?> typeReference); static T readUnchecked(final String content, final JavaType javaType); static T readUnchecked(final byte[] bytes, final Class<T> clazz); static T readUnchecked(final byte[] bytes, final TypeReference<?> typeReference); static T readUnchecked(final byte[] bytes, final JavaType javaType); static MappingIterator<Map<String, Object>> readValues(
      final InputStream stream, final TypeReference<Map<String, Object>> typeReference); static MappingIterator<JsonNode> readValues(
      final InputStream stream); static JsonNode readTree(final byte[] bytes); static JsonNode readTree(final String content); static JsonNode readTree(final File file); static JsonNode readTreeUnchecked(final byte[] bytes); static JsonNode readTreeUnchecked(final String content); static JsonNode readTreeUnchecked(final File file); static JavaType type(Type type); static JavaType type(final TypeReference<?> typeReference); static TypeFactory typeFactory(); static ObjectReader reader(); static ObjectWriter writer(); static T convert(Object from, Class<T> to); static byte[] sha1digest(final Object obj); static byte[] sha1digest(final Map<String, ?> obj);  }