java - JACKSON how to not include the wrapper for a field ? -
java - JACKSON how to not include the wrapper for a field ? -
jackson how not include wrapper field ?
public class authtype { map<string,string> properties; public map<string, string> getproperties() { homecoming properties; } public void setproperties(map<string, string> properties) { this.properties = properties; } }
it returns
{"properties":{"authtype":"xyz"}}
but want have
{"authtype":"xyz"}
any annotation ?
looks there no back upwards http://jira.codehaus.org/browse/jackson-765 workaround ?
starting in jackson 1.9, can utilize @jsonunwrapped annotation
public class authtype { map<string,string> properties; @jsonunwrapped public map<string, string> getproperties() { homecoming properties; } public void setproperties(map<string, string> properties) { this.properties = properties; } }
java jackson
Comments
Post a Comment