XStream xStream = new XStream () { @Override protected MapperWrapper wrapMapper ( MapperWrapper next ){ return new MapperWrapper ( next ) { @Override public boolean shouldSerializeMember ( Class definedIn , String fieldName ){ if ( definedI
@Override
protected MapperWrapper wrapMapper(MapperWrapper next){
return new MapperWrapper(next) {
@Override
public boolean shouldSerializeMember(Class definedIn, String fieldName){
if (definedIn == Object.class){
try {
return this.realClass(fieldName) != null;
} catch (Exception e){
return false;
}
} else {
return super.shouldSerializeMember(definedIn, fieldName);
}
}
};
}};
XStream.setupDefaultSecurity(xStream);
xStream.allowTypesByRegExp(new String[] { ".*" });
xStream.alias("Body",CmlabsReturn.ReportListResult.class);