Re: [Simple-support] Serializing/ deserializing Maps with null values
Brought to you by:
niallg
|
From: Niall G. <gal...@ya...> - 2008-02-12 18:23:06
|
Hi,
This seems like a bug, there is an if statement in the
Map converters that checks for null values, ill modify
this and add it to the next release.
In general, if you can serialize and not deserialize
then there is a bug somewhere. Every serialization
should be fully capable of deserialization.
Niall
--- Stanislaw Osinski <sta...@ca...>
wrote:
> Hi once more,
>
> Does the framework currently support serializing/
> deserializing maps with
> null values (see code below)? The serializer seems
> to output an empty node
> for such entries (with no key), which causes the
> deserializer to fail.
> Obviously, I can hack this around quite easily, but
> I was wondering if this
> is the intended behaviour?
>
> @Root
> public class SimpleTest
> {
> @ElementMap
> private Map<String, String> test = new
> HashMap<String, String>();
>
> public static void main(String [] args) throws
> Exception
> {
> SimpleTest test = new SimpleTest();
> test.test.put("test", null);
>
> Persister persister = new Persister();
> persister.write(test, System.out);
> }
> }
>
> Cheers,
>
> Staszek
> >
-------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio
> 2008.
>
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/>
_______________________________________________
> Simple-support mailing list
> Sim...@li...
>
https://lists.sourceforge.net/lists/listinfo/simple-support
>
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
|