@Test public void deserializeWithClassReference() { String serialized = "false"; assertEquals(Boolean.valueOf(serialized), POJOHelper.deserialize(serialized, Object.class)); }
public static <T extends Object> T deserialize(final String serialized, final Class<T> reference) { T result = null; try { result = MAPPER.readValue(serialized, reference); } catch (Exception e) { LOG.error("During deserialization", e); } return result; }
POJOHelper { public static <T extends Object> T deserialize(final String serialized, final Class<T> reference) { T result = null; try { result = MAPPER.readValue(serialized, reference); } catch (Exception e) { LOG.error("During deserialization", e); } return result; } }
POJOHelper { public static <T extends Object> T deserialize(final String serialized, final Class<T> reference) { T result = null; try { result = MAPPER.readValue(serialized, reference); } catch (Exception e) { LOG.error("During deserialization", e); } return result; } private  POJOHelper(); }
POJOHelper { public static <T extends Object> T deserialize(final String serialized, final Class<T> reference) { T result = null; try { result = MAPPER.readValue(serialized, reference); } catch (Exception e) { LOG.error("During deserialization", e); } return result; } private  POJOHelper(); static String serialize(final Object object); static T deserialize(final String serialized, final Class<T> reference); static T deserialize(final String serialized, final TypeReference<T> reference); }
POJOHelper { public static <T extends Object> T deserialize(final String serialized, final Class<T> reference) { T result = null; try { result = MAPPER.readValue(serialized, reference); } catch (Exception e) { LOG.error("During deserialization", e); } return result; } private  POJOHelper(); static String serialize(final Object object); static T deserialize(final String serialized, final Class<T> reference); static T deserialize(final String serialized, final TypeReference<T> reference);  }