Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | METHOD | DETAIL: FIELD | METHOD

## org.codehaus.groovy.grails.web.converters.marshaller
[Java] Interface ObjectMarshaller

    @java.lang.SuppressWarnings("rawtypes")
    public interface ObjectMarshaller

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

Method Summary
`void` | `marshalObject(java.lang.Object object, java.lang.Object converter)` Performs the conversion
`boolean` | `supports(java.lang.Object object)` Checks wheter the ObjectMarshaller is able/intended to support the given Object

Method Detail

### marshalObject

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

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

### supports

    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

Groovy Documentation