This post originated from an RSS feed registered with Web Buzz
by Friedrich Anode.
Original Post: XStream: how to serialize objects to non XML formats
Feed Title: Anode Says...
Feed URL: http://apps5.oingo.com/apps/domainpark/domainpark.cgi?client=GALT6690&s=asp.net
Feed Description: Web technology news and opinion.
Person person = ...;
xstream.marshal(stuff, new AnAlternativeWriter(out));
Producing the slightly more digestible:
com.blah.Person
firstName = Joe
lastName = Walnes
homePhone
areaCode = 123
number = 433535
cellPhone
areaCode = 4545
number = 4534
To gain roundtrip serialization/deserialization support in alternative formats to XML, you need to provide your own implementations of both HierarchicalStreamWriter and HierarchicalStreamReader.