Hi Remko,
Remko Tronçon wrote:
> Hi Jörg
>
>> Look at the converter tutorial. The last example at the end will do this
>> also.
>
> Oh, I must have missed that one. That seems to indeed do exactly what I
> wanted.
>
>> Since I assume, that your type containing the Optional is currently
>> handled by one of XStream's reflection-based converters, you may use
>> following non- obvious approach by wrapping the ReflectionProvider:
>
> Works like a charm!
>
>> I also assume that this is Java to XML only i.e. no deserialization,
>> because those fields containing Optionals referencing null will no longer
>> be initialized.
>
> Understood. I'm falling back on readResolve for filling in the gaps.
Yeah, but take care, readResolve is not hierarchically called in contrast to
readObject.
> Thanks a lot for your help!
You're welcome.
- Jörg
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email