Re: [Simple-support] stating the deserialization strategy on a class using annotation
Brought to you by:
niallg
|
From: Niall G. <gal...@ya...> - 2011-02-28 11:09:11
|
Hi, If you could provide more details that would be great! Not sure what your trying to achieve here. Have you tried the @Convert annotation or even a visitor? Niall --- On Sun, 27/2/11, hatchetman82 <hat...@gm...> wrote: > From: hatchetman82 <hat...@gm...> > Subject: [Simple-support] stating the deserialization strategy on a class using annotation > To: sim...@li... > Received: Sunday, 27 February, 2011, 10:47 PM > Hi. > > we use simple-xml to (de)serialize entity classes for out > application's REST api (using resteasy). > as part of the RESTeay api, there's an interface called > MessageBodyReader responsible for deserializing XML into a > java class > with the following signature: > public Object readFrom(Class type, /* stuff omitted */, > InputStream > inputStream); > deserializing some of our classes requires custom Strategy > implementations, which turns the implementation of the > above method > int a giant switchboard of if-elses according to the type > variable. it > would be very nice to be able to have some sort of > @DeserializationStrategy(value=[some strategy class]) > annotation on > simple-xml-annotated classes to prevent this scenario. > is this possible? > if so, is it on the roadmap anywhere? > > thanks in advance for any assistance, > radai. > > ------------------------------------------------------------------------------ > 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 > _______________________________________________ > Simple-support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simple-support > |