Re: [Simple-support] Serializing java.util.Set<Enum>
Brought to you by:
niallg
|
From: Niall G. - Y. <Nia...@yi...> - 2014-06-11 01:07:27
|
Try public static enum, reflection does not deal well with non static inners. Apart from that it should serialize fine.
From: Maxim Solodovnik [mailto:sol...@gm...]
Sent: 10 June 2014 18:19
To: sim...@li...
Subject: Re: [Simple-support] Serializing java.util.Set<Enum>
Sorry for the noise, was issue in my code, everything works as expected
On 10 June 2014 10:36, Maxim Solodovnik <sol...@gm...<mailto:sol...@gm...>> wrote:
Hello,
I currently have the following class
@Root(name = "A")
public class A implements Serializable {
public enum B {
b1, b2, b3, b4
}
@ElementList(data = true, required = false)
private Set<B> bs = new HashSet<A.B>();
}
And it seems like Set<B> is not serialized :(
Also tried with
@ElementMap
Is there any way to fix/debug this?
I'm using latest simple-xml
Thanks in advance
--
WBR
Maxim aka solomax
--
WBR
Maxim aka solomax
|