Change data object JSON element name

Posted on

Is there a way to change the JSON element name of the fields in a data object? For example:

public class Entity {
private String FEIN;
public String getFEIN() {
return FEIN;
}

public void setFEIN(String s) {
FEIN = s;
}
}

When I retrieve this object from RHDM using the GetObjects REST endpoint. It comes back as

{
fein: "123434343"
}

But I want it to come back this way.

{
FEIN: "123434343"
}

Responses