a <Java Serialization Toolkit>

As an example, consider the following class declaration (for the sake of conciseness, getters/setter for the private attributes are not listed):

public class Person
  private Set friends = new HashSet();
  private String name;
  private int age;
Let's make an instance of this class.
Person luc = new Person();
luc.setName("Luc Hogie");

And get the XML representation of this instance:

String xml = Jaseto.toXML(luc);
This will produce this XML description:
<object age="37" class="Person" name="Luc">
    <collection class="java.util.HashSet" />


In the other way around, to obtain an object out of its XML description, the following call suffices:

Person anotherLuc = Jaseto.fromXML(xml);

Excluding a field

Doing this:

This remove the friends field from the resulting XML text.
<object age="37" class="Person" name="Luc" />