[Simple-support] CycleStrategy and capturing id attributes
Brought to you by:
niallg
|
From: Dawid W. <daw...@gm...> - 2013-03-15 23:51:57
|
Hi Niall, everyone,
This caught me by surprise. I use CycleStrategy to deserialize a graph
of objects (some of which are backrefs to single declarations). So,
something like this:
<client id="foo">
</client>
<client id="bar">
</client>
I would like to capture Client's ID attribute if it was provided explicitly:
public static class Client {
@Attribute(required = false)
public String id;
}
This doesn't seem to work though (always null). I could use two
separate identifiers but this will be confusing to whoever is editing
those files... Thoughts?
Dawid
|