An ObjectMarshaller is responsible for converting a Java/Groovy Object graph to a serialized form (JSON,XML). The ObjectMarshaller implementation must use a a type parameter - either grails.convereters.JSON or grails.converters.XML and it should to be thread-safe.
Type Params | Return Type | Name and description |
---|---|---|
|
void |
marshalObject(java.lang.Object object, T converter) Performs the conversion |
|
boolean |
supports(java.lang.Object object) Checks wheter the ObjectMarshaller is able/intended to support the given Object |
Performs the conversion
object
- the object which is about getting convertedconverter
- the Converter to useChecks wheter the ObjectMarshaller is able/intended to support the given Object
object
- the object which is about getting convertedtrue
if the marshaller can/should perform the marshalling, false
otherwise