Is it possible using Wildfly's JAXB implementation? There is an answer Converting Java Object to Json using Marshaller, but it seems to be implementation specific.
Asked
Active
Viewed 2,501 times
2 Answers
1
if you were constrained to use the jaxb (for example, when you need the flexibility to have both xml and json class in the same spot) you might want to refer to these
A Simple tutorial, from MKYong
but if the jaxb is not a constraint to have, i reccomend using either GSON or jackson. they are both relatively easy to use when reading json to a POJO and vice-versa

irfani arief
- 91
- 7
-
The tutorial from mkyong shows an example in a context of JAX-RS service. I would like to marshall my object manually. – Sebastian May 19 '15 at 17:10
1
JSR-353 does not include object binding. If you want to marshal/unmarshal JSON you'd have to using something like Jackson.
It does you know real good now, but there is JSR-367 to include bindings in Java EE 8.

James R. Perkins
- 16,800
- 44
- 60