Have a bunch of classes which I need to do serialize and deserialize from/to JSON/XML at the same time. Which library you recommend to this task?
-
Tell us more about your constraints - on mobile, performance factors?SamStephens– SamStephens2011-03-05 04:09:49 +00:00Commented Mar 5, 2011 at 4:09
-
Not on mobile. The data is not large, so performace is not critical.user496949– user4969492011-03-05 04:12:50 +00:00Commented Mar 5, 2011 at 4:12
Add a comment
|
4 Answers
I like Jackson for JSON, and XStream for XML. We use them both in a product and they're pretty rugged. Jackson is very fast.
Update: @radai suggests the Simple XML library, which looks pretty interesting.
1 Comment
bdoughan
Check out: bdoughan.blogspot.com/2010/10/…
For xml we use simple (simple.sourceforge.net)
2 Comments
Jim Ferrans
Thanks, this looks like a very interesting option. XStream seems somewhat less flexible, and it's fairly slow. Simple looks worth checking out!
bdoughan
@radi: Check out - bdoughan.blogspot.com/2010/10/…
You can do both with Jackson: core package handles JSON, and xml-databinding extension module can do XML.
There are other modules that support BSON and CSV, as well; Jackson is becoming a general-purpose data-binding tool.
Comments
Here's a good resource for json
Here's a good resource for processing xml
1 Comment
Hugo Baés
Link-only response is highly discouraged.