Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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();
return mapper.convertValue(this, OBJ.class);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment