@Test(expectedExceptions = IllegalStateException.class) public void shouldFailToDeserializeOnUnknownTargetType() { String json = "{\"Blah\":{\"uuid\":\"123\",\"type\":1}}"; Serialization.fromJson(json); }
public static <T> T fromJson(byte[] json) { JsonNode node = null; try { node = mapper.readTree(json); } catch (Exception e) { throw Exceptions.uncheck(e, "Failed to deserialize json: {}", json); } return fromJson(node); }
Serialization { public static <T> T fromJson(byte[] json) { JsonNode node = null; try { node = mapper.readTree(json); } catch (Exception e) { throw Exceptions.uncheck(e, "Failed to deserialize json: {}", json); } return fromJson(node); } }
Serialization { public static <T> T fromJson(byte[] json) { JsonNode node = null; try { node = mapper.readTree(json); } catch (Exception e) { throw Exceptions.uncheck(e, "Failed to deserialize json: {}", json); } return fromJson(node); } private  Serialization(); }
Serialization { public static <T> T fromJson(byte[] json) { JsonNode node = null; try { node = mapper.readTree(json); } catch (Exception e) { throw Exceptions.uncheck(e, "Failed to deserialize json: {}", json); } return fromJson(node); } private  Serialization(); static T fromJson(byte[] json); static T fromJson(JsonNode node); static T fromJson(JsonNode node, Class<T> targetType); static T fromJson(JsonParser jsonParser); static T fromJson(String json); static T fromJson(String json, Class<T> targetType); static void injectMembers(Object object, JsonNode jsonNode); static void registerTarget(Class<?> targetType); static void registerTarget(String name, Class<?> targetType); static String toJson(JsonNode node); static String toJson(Object object); static JsonNode toJsonNode(Object object); static JsonNode toJsonNode(String json); }
Serialization { public static <T> T fromJson(byte[] json) { JsonNode node = null; try { node = mapper.readTree(json); } catch (Exception e) { throw Exceptions.uncheck(e, "Failed to deserialize json: {}", json); } return fromJson(node); } private  Serialization(); static T fromJson(byte[] json); static T fromJson(JsonNode node); static T fromJson(JsonNode node, Class<T> targetType); static T fromJson(JsonParser jsonParser); static T fromJson(String json); static T fromJson(String json, Class<T> targetType); static void injectMembers(Object object, JsonNode jsonNode); static void registerTarget(Class<?> targetType); static void registerTarget(String name, Class<?> targetType); static String toJson(JsonNode node); static String toJson(Object object); static JsonNode toJsonNode(Object object); static JsonNode toJsonNode(String json);  }