Danilo M.
Danilo M.

Reputation: 1592

Generate Java objects from JSON

I need to generate a Java class from a JSON response recieved from a web service. I've used JAXB to handle xml, but I don't know how to handle JSON. Does anyone know if a tool exists for this job? Thanks.

p.s.: I need to generate new classes, not convert classes.

Upvotes: 0

Views: 105

Answers (3)

Slater Victoroff
Slater Victoroff

Reputation: 21924

Going to go ahead and say that GSON (http://code.google.com/p/google-gson/) is a lot more user friendly albeit less powerful than Jackson. If you're just getting started with this stuff I'm willing to bet that GSON will give you far less headaches and be closer to what you really want.

Upvotes: 2

duffymo
duffymo

Reputation: 308988

Jackson is a good library. Give it a try.

Upvotes: 4

Related Questions