Are there any serialization frameworks for java
Posted
by
Grofit
on Stack Overflow
See other posts from Stack Overflow
or by Grofit
Published on 2010-12-31T11:22:28Z
Indexed on
2011/01/01
10:54 UTC
Read the original article
Hit count: 375
java
|serialization
I know there is simple, which seems to be a decent enough XML serializer and i know there is Jaxb which seems to do the job as well.
However im after something a bit more generic, so I could serialize my model to Xml, Json, Binary etc. So the models are just dumb objects that just get thrown into some sort of serialization factory and then the relevant output is spat out...
I dont see any reason why you couldn't do this with reflection, so for a REALLY simple solution get the relevent public properties, cut off the get or set and make that the element name... i.e getPersonName()
would become <PersonName>xxxx</PersonName>
or PersonName:XXXXX
© Stack Overflow or respective owner