Re: [Simple-support] Class type, jar size
Brought to you by:
niallg
|
From: Niall G. <gal...@ya...> - 2008-06-07 10:12:46
|
Hi, This simply means that StaX the XML parser used by simple does not need to be bundled with it in order for it to work with 1.6, for most other XML binding and serialization frameworks you will need quite a few dependancies which make the over all size much higher. Simple has no dependancies in Java 1.6. Niall --- On Fri, 6/6/08, Mark Wyszomierski <ma...@gm...> wrote: > From: Mark Wyszomierski <ma...@gm...> > Subject: Re: [Simple-support] Class type, jar size > To: gal...@ya... > Cc: sim...@li... > Date: Friday, June 6, 2008, 1:02 PM > Hi Niall, > > Thanks for the info. I'll check out the strategy stuff > now. > > As for the java 1.6 stuff, I don't quite understand > what this means. > My applet is linking to the simple jar which is ~180kb. If > the end > user is running java 1.6, does this mean that they > won't have to > 'download' the full 180kb jar, rather they'll > just need parts of it? > If that's the case, is that handled automatically, or > do I need to do > something in order to enable it? > > Thanks, > Mark > > On Fri, Jun 6, 2008 at 2:20 PM, Niall Gallagher > <gal...@ya...> wrote: > > Hi, > > > > Yes there is a way to send the type, the Strategy > object was implemented for just this. If you use the > org.simpleframework.xml.load.DefaultStrategy you can modify > it to send the class= parameter for each type. If you want > to go even further you can implement your own Strategy > perhaps based on the provided DefaultStrategy to send > something other than the class, for instance you could map > the class name to a code, for instance. > > > > com.domain.Person="person" > > com.domain.Address="address" > > > > And so on. As for a stripped down version, there is > none. However if you use Java 1.6 the XML serialization > framework has no dependencies. So no external tool which > many other frameworks require. > > > > Hope this helps > > Niall > > > > --- On Fri, 6/6/08, Mark Wyszomierski > <ma...@gm...> wrote: > > > >> From: Mark Wyszomierski <ma...@gm...> > >> Subject: [Simple-support] Class type, jar size > >> To: sim...@li... > >> Date: Friday, June 6, 2008, 4:12 AM > >> Hi all, > >> > >> I've been looking for a fast lightweight java > xml > >> serializer for a few > >> days, just came across Simple, it looks great. I > especially > >> like the > >> compact xml it can produce, since I'm going to > be using > >> it for string > >> message passing across a network. > >> > >> I'm wondering if there's a quick way to > query the > >> class type > >> serialized in a String, for example, I serialized > a class > >> called > >> Person: > >> > >> <person a="Bob" > b="55"> > >> > >> now I receive that string over the net, and I need > to > >> figure out what > >> kind of class is serialized in it. Is there some > facility > >> in Simple > >> for doing that, or should I prepend some header > myself? > >> > >> Also, the Simple library is ~180k - is there some > stripped > >> down > >> version which makes a smaller jar by any chance? > >> > >> Thanks for the great tool, > >> Mark > >> > >> > ------------------------------------------------------------------------- > >> Check out the new SourceForge.net Marketplace. > >> It's the best place to buy or sell services > for > >> just about anything Open Source. > >> http://sourceforge.net/services/buy/index.php > >> _______________________________________________ > >> Simple-support mailing list > >> Sim...@li... > >> > https://lists.sourceforge.net/lists/listinfo/simple-support > > > > > > > > |