This is my situation:
private Map<String, Object> data = new HashMap<>();
public void setName(String x) {put("name", x);}
public String getName() {return (String)get("name");}
public void setAge(Integer x) {put("age", x);}
public Integer getAge() {return (Integer)get("age");}
public void setUUID(UUID x) {put("uuid", x);}
public UUID getUUID() {return (UUID)get("uuid");}
Now when I generate JSON from this object I get {"data":{"name": ...}} I don't want the "data":{} part.
How to fix this?
[EDIT] When this class is exported as JSON by Spring the format is exactly what I want.