user496949
user496949

Reputation: 86055

How to serialize/deserialize in both JSON and XML format in Java?

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?

Upvotes: 1

Views: 2510

Answers (4)

StaxMan
StaxMan

Reputation: 116472

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.

Upvotes: 1

Jim Ferrans
Jim Ferrans

Reputation: 31012

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.

Upvotes: 2

radai
radai

Reputation: 24192

For xml we use simple (simple.sourceforge.net)

Upvotes: 1

RDL
RDL

Reputation: 7961

Here's a good resource for json

Here's a good resource for processing xml

Upvotes: -2

Related Questions