@Test public void testFromJsonToObj() throws IOException { MSString expectedObj = new MSString("testing 123"); String json = "{\"value\":\"testing 123\"}"; MSString obj = dtoUtil.fromJSONToObject(json, MSString.class); assertThat(obj).isEqualTo(expectedObj); }
public static <T> T fromJSONToObject(String json, Class<T> clazz) throws IOException { ObjectMapper mapper = new ObjectMapper(); return mapper.readValue(json, clazz); }
DTOUtil { public static <T> T fromJSONToObject(String json, Class<T> clazz) throws IOException { ObjectMapper mapper = new ObjectMapper(); return mapper.readValue(json, clazz); } }
DTOUtil { public static <T> T fromJSONToObject(String json, Class<T> clazz) throws IOException { ObjectMapper mapper = new ObjectMapper(); return mapper.readValue(json, clazz); }  }
DTOUtil { public static <T> T fromJSONToObject(String json, Class<T> clazz) throws IOException { ObjectMapper mapper = new ObjectMapper(); return mapper.readValue(json, clazz); }  @SuppressWarnings({ "unchecked", "known.nonnull" }) String toXML(@Nonnull T obj); T toObject(String xml, Class<T> clazz); String toJSON(Object obj); static T fromJSONToObject(String json, Class<T> clazz); }
DTOUtil { public static <T> T fromJSONToObject(String json, Class<T> clazz) throws IOException { ObjectMapper mapper = new ObjectMapper(); return mapper.readValue(json, clazz); }  @SuppressWarnings({ "unchecked", "known.nonnull" }) String toXML(@Nonnull T obj); T toObject(String xml, Class<T> clazz); String toJSON(Object obj); static T fromJSONToObject(String json, Class<T> clazz);  }