Giacomo
Giacomo

Reputation: 17

Marshalling/Unmarshalling Groovy Object using JAXB without annotation

i'm trying to do a library for an university project that make the marshalling/unmarshalling for a Groovy object without any annotation on the marshalled object class.

Is there any problem using JAXB the same way i would use it for any Java object? Is there any limitations?

Thanks in advance, Giacomo

Upvotes: 0

Views: 639

Answers (1)

pczeus
pczeus

Reputation: 7867

The answer to your question is No. Remember that ultimately Groovy objects are compiled into Java byte code. As a result, they will be handled just like any other Java objects. On our projects we use pure Groovy POGO (Plain Old Groovy Objects), which is much cleaner than the Java counterparts and do not encounter any anomalies or unexpected behavior when marshaling or unmarshaling to XML or JSON.

Upvotes: 0

Related Questions