@Metadata(label="dataformat,transformation,json", title="JSon") public class JsonDataFormat extends DataFormatDefinition implements ContentTypeHeaderAware
Constructor and Description |
---|
JsonDataFormat() |
JsonDataFormat(JsonLibrary library) |
Modifier and Type | Method and Description |
---|---|
JsonDataFormat |
allowJmsType(boolean allowJmsType) |
JsonDataFormat |
allowJmsType(String allowJmsType) |
JsonDataFormat |
allowUnmarshallType(boolean allowUnmarshallType) |
JsonDataFormat |
allowUnmarshallType(String allowUnmarshallType) |
JsonDataFormat |
autoDiscoverObjectMapper(boolean autoDiscoverObjectMapper) |
JsonDataFormat |
autoDiscoverObjectMapper(String autoDiscoverObjectMapper) |
JsonDataFormat |
collectionType(Class<?> collectionType) |
JsonDataFormat |
collectionType(String collectionType) |
JsonDataFormat |
disableFeatures(String disableFeatures) |
JsonDataFormat |
dropRootNode(boolean dropRootNode) |
JsonDataFormat |
dropRootNode(String dropRootNode) |
JsonDataFormat |
enableFeatures(String enableFeatures) |
String |
getAllowJmsType() |
String |
getAllowUnmarshallType() |
String |
getAutoDiscoverObjectMapper() |
String |
getAutoDiscoverSchemaResolver() |
Class<?> |
getCollectionType() |
String |
getCollectionTypeName() |
String |
getContentTypeHeader()
Whether the data format should set the Content-Type header with the type from the data format.
|
String |
getDataFormatName() |
String |
getDisableFeatures() |
String |
getDropRootNode() |
String |
getEnableFeatures() |
String |
getInclude() |
Class<?> |
getJsonView() |
String |
getJsonViewTypeName() |
JsonLibrary |
getLibrary() |
String |
getModuleClassNames() |
String |
getModuleRefs() |
String |
getObjectMapper() |
String |
getPermissions() |
String |
getPrettyPrint() |
String |
getSchemaResolver() |
String |
getTimezone() |
Class<?> |
getUnmarshalType() |
String |
getUnmarshalTypeName() |
String |
getUseDefaultObjectMapper() |
String |
getUseList() |
JsonDataFormat |
include(String include) |
JsonDataFormat |
jsonView(Class<?> jsonView) |
JsonDataFormat |
library(JsonLibrary library) |
JsonDataFormat |
moduleClassNames(String moduleClassNames) |
JsonDataFormat |
moduleRefs(String moduleRefs) |
JsonDataFormat |
objectMapper(String objectMapper) |
JsonDataFormat |
permissions(String permissions) |
JsonDataFormat |
prettyPrint(boolean prettyPrint) |
JsonDataFormat |
prettyPrint(String prettyPrint) |
void |
setAllowJmsType(String 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(String allowUnmarshallType)
If enabled then Jackson is allowed to attempt to use the CamelJacksonUnmarshalType header during the
unmarshalling.
|
void |
setAutoDiscoverObjectMapper(String autoDiscoverObjectMapper)
If set to true then Jackson will lookup for an objectMapper into the registry
|
void |
setAutoDiscoverSchemaResolver(String autoDiscoverSchemaResolver)
When not disabled, the SchemaResolver will be looked up into the registry
|
void |
setCollectionType(Class<?> collectionType) |
void |
setCollectionTypeName(String collectionTypeName)
Refers to a custom collection type to lookup in the registry to use.
|
void |
setContentTypeHeader(String contentTypeHeader)
Whether the data format should set the Content-Type header with the type from the data format.
|
void |
setDisableFeatures(String disableFeatures)
Set of features to disable on the Jackson com.fasterxml.jackson.databind.ObjectMapper.
|
void |
setDropRootNode(String dropRootNode)
Whether XStream will drop the root node in the generated JSon.
|
void |
setEnableFeatures(String enableFeatures)
Set of features to enable on the Jackson com.fasterxml.jackson.databind.ObjectMapper.
|
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 |
setJsonViewTypeName(String jsonViewTypeName)
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(String prettyPrint)
To enable pretty printing output nicely formatted.
|
void |
setSchemaResolver(String schemaResolver)
Optional schema resolver used to lookup schemas for the data in transit.
|
void |
setTimezone(String timezone)
If set then Jackson will use the Timezone when marshalling/unmarshalling.
|
void |
setUnmarshalType(Class<?> unmarshalType)
Class of the java type to use when unmarshalling
|
void |
setUnmarshalTypeName(String unmarshalTypeName)
Class name of the java type to use when unmarshalling
|
void |
setUseDefaultObjectMapper(String useDefaultObjectMapper)
Whether to lookup and use default Jackson ObjectMapper from the registry.
|
void |
setUseList(String useList)
To unmarshal to a List of Map or a List of Pojo.
|
JsonDataFormat |
timezone(String timezone) |
JsonDataFormat |
unmarshalType(Class<?> unmarshalType) |
JsonDataFormat |
unmarshalType(String unmarshalType) |
JsonDataFormat |
useDefaultObjectMapper(boolean useDefaultObjectMapper) |
JsonDataFormat |
useDefaultObjectMapper(String useDefaultObjectMapper) |
JsonDataFormat |
useList(boolean useList) |
JsonDataFormat |
useList(String useList) |
getDataFormat, getShortName, setDataFormat, setDataFormatName
getId, setId
public JsonDataFormat()
public JsonDataFormat(JsonLibrary library)
public String getContentTypeHeader()
ContentTypeHeaderAware
getContentTypeHeader
in interface ContentTypeHeaderAware
public void setContentTypeHeader(String contentTypeHeader)
ContentTypeHeaderAware
setContentTypeHeader
in interface ContentTypeHeaderAware
public String getObjectMapper()
public void setObjectMapper(String objectMapper)
public String getUseDefaultObjectMapper()
public void setUseDefaultObjectMapper(String useDefaultObjectMapper)
public String getPrettyPrint()
public void setPrettyPrint(String 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 String getJsonViewTypeName()
public void setJsonViewTypeName(String jsonViewTypeName)
public Class<?> getJsonView()
public void setJsonView(Class<?> jsonView)
public String getInclude()
public void setInclude(String include)
public String getAllowJmsType()
public void setAllowJmsType(String allowJmsType)
public String getCollectionTypeName()
public void setCollectionTypeName(String collectionTypeName)
public Class<?> getCollectionType()
public void setCollectionType(Class<?> collectionType)
public String getUseList()
public void setUseList(String useList)
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 String getAllowUnmarshallType()
public void setAllowUnmarshallType(String allowUnmarshallType)
public String getTimezone()
public void setTimezone(String timezone)
public String getAutoDiscoverObjectMapper()
public void setAutoDiscoverObjectMapper(String autoDiscoverObjectMapper)
public String getDropRootNode()
public void setDropRootNode(String dropRootNode)
public String getDataFormatName()
getDataFormatName
in class DataFormatDefinition
public void setSchemaResolver(String schemaResolver)
public String getSchemaResolver()
public String getAutoDiscoverSchemaResolver()
public void setAutoDiscoverSchemaResolver(String autoDiscoverSchemaResolver)
public JsonDataFormat objectMapper(String objectMapper)
public JsonDataFormat useDefaultObjectMapper(boolean useDefaultObjectMapper)
public JsonDataFormat useDefaultObjectMapper(String useDefaultObjectMapper)
public JsonDataFormat prettyPrint(boolean prettyPrint)
public JsonDataFormat prettyPrint(String prettyPrint)
public JsonDataFormat library(JsonLibrary library)
public JsonDataFormat unmarshalType(String unmarshalType)
public JsonDataFormat unmarshalType(Class<?> unmarshalType)
public JsonDataFormat jsonView(Class<?> jsonView)
public JsonDataFormat include(String include)
public JsonDataFormat allowJmsType(boolean allowJmsType)
public JsonDataFormat allowJmsType(String allowJmsType)
public JsonDataFormat collectionType(String collectionType)
public JsonDataFormat collectionType(Class<?> collectionType)
public JsonDataFormat useList(boolean useList)
public JsonDataFormat useList(String useList)
public JsonDataFormat moduleClassNames(String moduleClassNames)
public JsonDataFormat moduleRefs(String moduleRefs)
public JsonDataFormat enableFeatures(String enableFeatures)
public JsonDataFormat disableFeatures(String disableFeatures)
public JsonDataFormat permissions(String permissions)
public JsonDataFormat allowUnmarshallType(boolean allowUnmarshallType)
public JsonDataFormat allowUnmarshallType(String allowUnmarshallType)
public JsonDataFormat timezone(String timezone)
public JsonDataFormat autoDiscoverObjectMapper(boolean autoDiscoverObjectMapper)
public JsonDataFormat autoDiscoverObjectMapper(String autoDiscoverObjectMapper)
public JsonDataFormat dropRootNode(boolean dropRootNode)
public JsonDataFormat dropRootNode(String dropRootNode)
Apache Camel