@Test(expectedExceptions = SerializationException.class) public void testErrorDeserialize() throws SerializationException { String cardStr = "{\"number\":\"12345\"\"}"; JsonUtil.deserialize(cardStr, new TypeReference<Card>() {} ); }
public static Object deserialize(String json, TypeReference<?> typeReference) throws SerializationException { try { logger.debug("Json string to deserialize {} ", json); return mapper.readValue(json, typeReference); } catch (IOException e) { logger.error("SerializationException {}", e.getMessage()); SerializationException serializationException = new SerializationException(e); throw serializationException; } }
JsonUtil { public static Object deserialize(String json, TypeReference<?> typeReference) throws SerializationException { try { logger.debug("Json string to deserialize {} ", json); return mapper.readValue(json, typeReference); } catch (IOException e) { logger.error("SerializationException {}", e.getMessage()); SerializationException serializationException = new SerializationException(e); throw serializationException; } } }
JsonUtil { public static Object deserialize(String json, TypeReference<?> typeReference) throws SerializationException { try { logger.debug("Json string to deserialize {} ", json); return mapper.readValue(json, typeReference); } catch (IOException e) { logger.error("SerializationException {}", e.getMessage()); SerializationException serializationException = new SerializationException(e); throw serializationException; } }  }
JsonUtil { public static Object deserialize(String json, TypeReference<?> typeReference) throws SerializationException { try { logger.debug("Json string to deserialize {} ", json); return mapper.readValue(json, typeReference); } catch (IOException e) { logger.error("SerializationException {}", e.getMessage()); SerializationException serializationException = new SerializationException(e); throw serializationException; } }  static String serialize(Object obj); static Object deserialize(String json, TypeReference<?> typeReference); }
JsonUtil { public static Object deserialize(String json, TypeReference<?> typeReference) throws SerializationException { try { logger.debug("Json string to deserialize {} ", json); return mapper.readValue(json, typeReference); } catch (IOException e) { logger.error("SerializationException {}", e.getMessage()); SerializationException serializationException = new SerializationException(e); throw serializationException; } }  static String serialize(Object obj); static Object deserialize(String json, TypeReference<?> typeReference); static ObjectMapper mapper; static final String TIMEZONE_UTC; static final String DATETIMEFORMAT; }