Can JAXB be used as the marshaller for Grails? My domain classes are JAXB annotated Java classes and GORM is currently marshalling them but not distinguishing between empty and null strings. JAXB can make this distinction, so I would like to use JAXB if possible.
JAXB is being used on the client side and I'm trying to get these Java objects from the server to the client without changing them, but GORM causes null strings to become empty strings.
How can I setup JAXB to replace the Grails marshalling? Any answer should include an example where there are a list of objects of the same type and they get marshalled together in some wrapper element (as this happens on an index action and is common in my application). The name of the tag of the wrapper element is less important. Grails uses "list", which works with JAXB, but other marshallers I've seen use the plural of the object type, which also works with JAXB.