Hi Robert,

Robert Feustel wrote:

> Hello there,
> 
> I'm trying to serialize a complex object that I wrote
> a custom serializer (write/readObject() method) for. Now, when I try
> running this through xstream it appears that this custom serializer is
> completely ignored... It's a hierarchical dataset containing multiple
> instances (in depth as well as width) of custom objects with custom
> serialization methods...
> 
> Is there a way to tell xstream to only use
> the serialization that java uses... The one I specified?

XStream respects those serializers by default (*), why do you think 
otherwise? Marshal such an object to XML and back again and ensure either 
with the debugger or System.println() calls that your methods have been 
called.

*) Without XStream annotations or further configuration, just by:

==================== %< ====================
 XStream xstream = new XStream();
 String xml = xstream.toXML(yourObject);
 YourType yourObjectAgain = (YourType)xstream.fromXML(xml);
==================== %< ====================

However, you might have influenced this depending on your XStream setup.

Cheers,
Jörg


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to