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

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -