[Simple-support] Availabily of object inlining
Brought to you by:
niallg
|
From: Maxim S. <sol...@gm...> - 2012-07-27 09:04:44
|
Hello,
I have very specific question regarding object serialization:
Our current code uses "hand writed" serialization/deserialization to/from
XML.
I would like to port it to use "Simple framework".
2 features I was unable to find in documentation/examples
1) serializing of List<MyObject> (can be workarounded by creating
additional class holding list as the only parameter)
2) inlining of property object:
imaging we have
@Root
class A {
@Element
String prop;
@Element
B b;
}
@Root
class B {
@Element
String propB1;
@Element
String propB2;
}
Serializing of A will produce:
<a>
<prop></prop>
<b>
<propB1></propB1>
<propB2></propB2>
</b>
</a>
what I need is to get (to be compatible with previous versions)
<a>
<prop></prop>
<propB1></propB1>
<propB2></propB2>
</a>
Is this possible somehow?
Maybe 1) above can be implemented without creating additional class?
Sorry for the long post
Thanks in advance
--
WBR
Maxim aka solomax
|