Hi Jamie,
Spence, Jamie wrote:
> Hi There,
>
> I was previously using xStream to deserialzise a HashMap<String,Object>,
> but I would like to change this to TreeMap<String,Object> to introduce
> ordering on the String key. Is there a way of overriding the TreeMap
> converter to keep the current structure of my XML files (I want the same
> serialised structure as a HashMap)?
XStream uses by default the <map> element, but just because it calls
internally at initialization time:
this.addDefaultImplementation(HashMap.class, Map.class);
So you can call this method a second time with TreeMap as default for a Map
implementation.
Cheers,
Jörg
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email