[Simple-support] Serializing/ deserializing Maps with null values
Brought to you by:
niallg
|
From: Stanislaw O. <sta...@ca...> - 2008-02-11 20:52:53
|
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
|