I have the following test table:
CREATE TABLE user (
id UUID NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
name VARCHAR(100),
address jsonb
)
What I want to do is loading this table into an entity
public class Buddy{
@Id
private UUID id;
private String name;
private Address address;
//getter and setter
}
where the Address is something like
public class Address {
@JsonProperty("name")
public String name;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
Is not clear to me how can I convert my json string into a java Pojo? is possible doing this, or is out of the scope?