Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Herança?
public String toJson() throws JsonProcessingException {
ObjectMapper mapper = new ObjectMapper();
return mapper.writeValueAsString(this);
}
public PessoaFisica toModel() {
SimpleDateFormat df = new SimpleDateFormat("dd/MM/yyyy");
ObjectMapper mapper = new ObjectMapper();
mapper.setDateFormat(df);
return mapper.convertValue(this, OBJ.class);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment