@Metadata(label="dataformat,transformation,json", title="JSon") public class JsonDataFormat extends DataFormatDefinition
Constructor and Description |
---|
JsonDataFormat() |
JsonDataFormat(JsonLibrary library) |
Modifier and Type | Method and Description |
---|---|
protected void |
configureDataFormat(DataFormat dataFormat,
CamelContext camelContext)
Allows derived classes to customize the data format
|
protected DataFormat |
createDataFormat(RouteContext routeContext)
Factory method to create the data format instance
|
Boolean |
getAllowJmsType() |
Boolean |
getAllowUnmarshallType() |
String |
getCollectionTypeName() |
String |
getDataFormatName() |
String |
getDisableFeatures() |
String |
getEnableFeatures() |
Boolean |
getEnableJaxbAnnotationModule() |
String |
getInclude() |
Class<?> |
getJsonView() |
JsonLibrary |
getLibrary() |
String |
getModuleClassNames() |
String |
getModuleRefs() |
String |
getObjectMapper() |
String |
getPermissions() |
Boolean |
getPrettyPrint() |
Class<?> |
getUnmarshalType() |
String |
getUnmarshalTypeName() |
Boolean |
getUseList() |
void |
setAllowJmsType(Boolean allowJmsType)
Used for JMS users to allow the JMSType header from the JMS spec to specify a FQN classname
to use to unmarshal to.
|
void |
setAllowUnmarshallType(Boolean allowUnmarshallType)
If enabled then Jackson is allowed to attempt to use the CamelJacksonUnmarshalType header during the unmarshalling.
|
void |
setCollectionTypeName(String collectionTypeName)
Refers to a custom collection type to lookup in the registry to use.
|
void |
setDisableFeatures(String disableFeatures)
Set of features to disable on the Jackson com.fasterxml.jackson.databind.ObjectMapper.
|
void |
setEnableFeatures(String enableFeatures)
Set of features to enable on the Jackson com.fasterxml.jackson.databind.ObjectMapper.
|
void |
setEnableJaxbAnnotationModule(Boolean enableJaxbAnnotationModule)
Whether to enable the JAXB annotations module when using jackson.
|
void |
setInclude(String include)
If you want to marshal a pojo to JSON, and the pojo has some fields with null values.
|
void |
setJsonView(Class<?> jsonView)
When marshalling a POJO to JSON you might want to exclude certain fields from the JSON output.
|
void |
setLibrary(JsonLibrary library)
Which json library to use.
|
void |
setModuleClassNames(String moduleClassNames)
To use custom Jackson modules com.fasterxml.jackson.databind.Module specified as a String with FQN class names.
|
void |
setModuleRefs(String moduleRefs)
To use custom Jackson modules referred from the Camel registry.
|
void |
setObjectMapper(String objectMapper)
Lookup and use the existing ObjectMapper with the given id when using Jackson.
|
void |
setPermissions(Class<?>... type)
To add permission for the given pojo classes.
|
void |
setPermissions(String permissions)
Adds permissions that controls which Java packages and classes XStream is allowed to use during
unmarshal from xml/json to Java beans.
|
void |
setPrettyPrint(Boolean prettyPrint)
To enable pretty printing output nicely formatted.
|
void |
setUnmarshalType(Class<?> unmarshalType)
Class of the java type to use when unarmshalling
|
void |
setUnmarshalTypeName(String unmarshalTypeName)
Class name of the java type to use when unarmshalling
|
void |
setUseList(Boolean useList)
To unarmshal to a List of Map or a List of Pojo.
|
configureDataFormat, getContentTypeHeader, getDataFormat, getDataFormat, getDataFormat, getOtherAttributes, getShortName, setContentTypeHeader, setDataFormat, setDataFormatName, setOtherAttributes, setProperty, setProperty
getId, setId
public JsonDataFormat()
public JsonDataFormat(JsonLibrary library)
public String getObjectMapper()
public void setObjectMapper(String objectMapper)
public Boolean getPrettyPrint()
public void setPrettyPrint(Boolean prettyPrint)
public String getUnmarshalTypeName()
public void setUnmarshalTypeName(String unmarshalTypeName)
public Class<?> getUnmarshalType()
public void setUnmarshalType(Class<?> unmarshalType)
public JsonLibrary getLibrary()
public void setLibrary(JsonLibrary library)
public Class<?> getJsonView()
public void setJsonView(Class<?> jsonView)
public String getInclude()
public void setInclude(String include)
public Boolean getAllowJmsType()
public void setAllowJmsType(Boolean allowJmsType)
public String getCollectionTypeName()
public void setCollectionTypeName(String collectionTypeName)
public Boolean getUseList()
public void setUseList(Boolean useList)
public Boolean getEnableJaxbAnnotationModule()
public void setEnableJaxbAnnotationModule(Boolean enableJaxbAnnotationModule)
public String getModuleClassNames()
public void setModuleClassNames(String moduleClassNames)
public String getModuleRefs()
public void setModuleRefs(String moduleRefs)
public String getEnableFeatures()
public void setEnableFeatures(String enableFeatures)
public String getDisableFeatures()
public void setDisableFeatures(String disableFeatures)
public String getPermissions()
public void setPermissions(String permissions)
public void setPermissions(Class<?>... type)
type
- the pojo class(es) xstream should use as allowed permissionsetPermissions(String)
public Boolean getAllowUnmarshallType()
public void setAllowUnmarshallType(Boolean allowUnmarshallType)
public String getDataFormatName()
getDataFormatName
in class DataFormatDefinition
protected DataFormat createDataFormat(RouteContext routeContext)
DataFormatDefinition
createDataFormat
in class DataFormatDefinition
protected void configureDataFormat(DataFormat dataFormat, CamelContext camelContext)
DataFormatDefinition
configureDataFormat
in class DataFormatDefinition
Apache Camel