Package: org.codehaus.groovy.grails.web.converters.marshaller

## [Java] Interface ObjectMarshaller<T>

- 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.

  Authors:
    Siegfried Puchbauer
  Since:
    1.1

- - ### Methods Summary

    Methods
    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

- - ### Method Detail

    - #### public void marshalObject(java.lang.Object object, T converter)

      Performs the conversion

      throws:
        ConverterException on failure
      Parameters:
        `object` - the object which is about getting converted
        `converter` - the Converter to use

    - #### public boolean supports(java.lang.Object object)

      Checks wheter the ObjectMarshaller is able/intended to support the given Object

      Parameters:
        `object` - the object which is about getting converted
      Returns:
        `true` if the marshaller can/should perform the marshalling, `false` otherwise