|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.camel.component.jackson.JacksonDataFormat
public class JacksonDataFormat
A data format (DataFormat
)
using Jackson to marshal to and from JSON.
Constructor Summary | |
---|---|
JacksonDataFormat()
Use the default Jackson ObjectMapper and Map |
|
JacksonDataFormat(Class<?> unmarshalType)
Use the default Jackson ObjectMapper and with a custom
unmarshal type |
|
JacksonDataFormat(org.codehaus.jackson.map.ObjectMapper mapper,
Class<?> unmarshalType)
Use a custom Jackson mapper and and unmarshal type |
Method Summary | |
---|---|
org.codehaus.jackson.map.ObjectMapper |
getObjectMapper()
|
Class<?> |
getUnmarshalType()
|
void |
marshal(Exchange exchange,
Object graph,
OutputStream stream)
|
void |
setUnmarshalType(Class<?> unmarshalType)
|
Object |
unmarshal(Exchange exchange,
InputStream stream)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JacksonDataFormat()
ObjectMapper
and Map
public JacksonDataFormat(Class<?> unmarshalType)
ObjectMapper
and with a custom
unmarshal type
unmarshalType
- the custom unmarshal typepublic JacksonDataFormat(org.codehaus.jackson.map.ObjectMapper mapper, Class<?> unmarshalType)
mapper
- the custom mapperunmarshalType
- the custom unmarshal typeMethod Detail |
---|
public void marshal(Exchange exchange, Object graph, OutputStream stream) throws Exception
marshal
in interface DataFormat
Exception
public Object unmarshal(Exchange exchange, InputStream stream) throws Exception
unmarshal
in interface DataFormat
Exception
public Class<?> getUnmarshalType()
public void setUnmarshalType(Class<?> unmarshalType)
public org.codehaus.jackson.map.ObjectMapper getObjectMapper()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |