Re: [Simple-support] Simple 2.5
Brought to you by:
niallg
|
From: Niall G. <gal...@ya...> - 2011-04-12 13:10:20
|
Hi,
Correction, these annotations have been renamed in 2.5 as
@Union
@UnionList
@UnionMap
Niall
--- On Fri, 8/4/11, Niall Gallagher <gal...@ya...> wrote:
> From: Niall Gallagher <gal...@ya...>
> Subject: Simple 2.5
> To: sim...@li...
> Received: Friday, 8 April, 2011, 8:05 AM
> Hi,
>
> I have released Simple 2.5. This release contains a set of
> new annotations.
>
> @Variant
> @VariantList
> @VariantMap
>
> This allows constructs such as
>
> @Variant({
>
> @Element(name="login"),
>
> @Element(name="account"),
>
> @Element(name="username"),
>
> @Element(name="id"),
>
> @Element(name="name")
> })
> private final String name;
>
> And for lists
>
> @VariantList({
>
> @ElementList(entry="double", inline=true,
> type=DoubleEntry.class),
>
> @ElementList(entry="text", inline=true,
> type=StringEntry.class),
>
> @ElementList(entry="int", inline=true,
> type=IntegerEntry.class)
> })
> private List<Entry> list;
>
> This allows dynamic serialization of types, matched by type
> on serialization and on XML element name for
> deserialization. This also ensures there is no need for
> class= attributes to determine the type and makes the
> generated XML more transparent.
>
> Regards,
> Niall
>
|