Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public LocalDate deserialize(JsonParser p, DeserializationContext ctxt) throws IOException, JsonProcessingException {
- DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd/MM/yyyy");
- String data = p.getValueAsString();;
- if (data.equals("")) return LocalDate.parse("01/01/0001", formatter);
- else return LocalDate.parse(data, formatter);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement