Re: [Simple-support] how to deserialize without setter and getters
Brought to you by:
niallg
|
From: Niall G. <gal...@ya...> - 2011-03-04 11:53:32
|
Do thos@Rootclass Node {@Textpublic int id;public Node(@Text int id){this.id = id;}}
@Defaultclass Edge {Node from;Node to;}
Niall--- On Wed, 2/3/11, gato chlr <da...@gm...> wrote:
From: gato chlr <da...@gm...>
Subject: [Simple-support] how to deserialize without setter and getters
To: sim...@li...
Received: Wednesday, 2 March, 2011, 9:37 AM
Hi list
I'm receiving the next xml:
<edge>
<to>10</to>
<from>20</from>
</edge>
the value for elements 'to' and 'from' is the Node class 'id'
the classes are the next:
class Edge{
Node from;
Node to;
//..setters and getters
}
and
Class Node{
int id;
public Node(int id){
this.id=id;
//no setters and getters
}
how can I perform the annotations in order to unmarshall (deserialize) from that xml??
I have read some of the tutorial but, there is some similar problem, but I have failed on the implementation, that's because I'm new using Simple.
Thanks a lot.
#yiv2031589334 #yiv2031589334avg_ls_inline_popup {padding:0px 0px;margin-left:0px;margin-top:0px;width:240px;overflow:hidden;word-wrap:break-word;color:black;font-size:10px;text-align:left;line-height:13px;}
-----Inline Attachment Follows-----
------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in
Real-Time with Splunk. Collect, index and harness all the fast moving IT data
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business
insights. http://p.sf.net/sfu/splunk-dev2dev
-----Inline Attachment Follows-----
_______________________________________________
Simple-support mailing list
Sim...@li...
https://lists.sourceforge.net/lists/listinfo/simple-support
|