JACKSONフィールドのラッパーをどのように含めるべきですか?JACKSONフィールドのラッパーをどのように含めるべきですか?
public class AuthType {
Map<String,String> properties;
public Map<String, String> getProperties() {
return properties;
}
public void setProperties(Map<String, String> properties) {
this.properties = properties;
}
}
それは
{"properties":{"authType":"XYZ"}}
返しますが、私は
{"authType":"XYZ"}
どれでも注釈をしたいですか?
サポートがありません。http://jira.codehaus.org/browse/JACKSON-765回避策はありますか?
を使用することができますなぜあなたは単に行わないobjectMappger.writeValueAsString(authType.getProperties())? – weekens