How to skip certain fields of object in serialization of Obj to XML.
code is here
How to skip certain fields of object in serialization of Obj to XML.
code is here
mark the fields to skip with the 'transient' keyword
Example based on your code:
public class Foo {
public transient int a;
public String b;
public Bar boo;
public Foo(int a, String b, Bar c) {
this.a = a;
this.b = b;
this.boo = c;
}
}
the property a will not be serialized to XML