Details
-
Type: New Feature
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.2.2
-
Component/s: None
-
Labels:None
-
JDK version and platform:1.5.0_01
Description
It would be very helpful if you could configure XStream to ignore certain fields and certain classes when outputing xml.
For example
public class X {
private int v;
}
public class Y {
private int w;
private int z;
private X x;
}
would generally create something like:
<Y>
<w>0</w>
<z>0</z>
<x>
<v>0</v>
</x>
</Y>
putting in the following:
xstream.ignoreClass(X.class);
xstream.ignoreField(Y.class, "z");
would yield:
<Y>
<w>0</w>
</Y>
Issue Links
- relates to
-
XSTR-68 Migration: specify ignorable fields
Was implemented in 1.1.3: XStream.omitField()