T
- type of objects to marshalpublic class JacksonJsonObjectMarshaller<T> extends java.lang.Object implements JsonObjectMarshaller<T>
Constructor and Description |
---|
JacksonJsonObjectMarshaller() |
JacksonJsonObjectMarshaller(com.fasterxml.jackson.databind.ObjectMapper objectMapper) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
marshal(T item)
Marshal an object into a json representation.
|
void |
setObjectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
Set the
ObjectMapper to use. |
public JacksonJsonObjectMarshaller()
public JacksonJsonObjectMarshaller(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
public void setObjectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
ObjectMapper
to use.objectMapper
- to useJacksonJsonObjectMarshaller(ObjectMapper)
public java.lang.String marshal(T item)
JsonObjectMarshaller
marshal
in interface JsonObjectMarshaller<T>
item
- to marshal