简体   繁体   中英

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM