This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git
The following commit(s) were added to refs/heads/main by this push:
new 233db38bf71 CAMEL-21199: camel-jackson - Add useWriter option to allow
2/4-bytes chars (such as japanese) to work with Jackson
233db38bf71 is described below
commit 233db38bf7174c074aaeeaf1e87bb8a0b39a0d16
Author: Claus Ibsen <[email protected]>
AuthorDate: Fri Sep 13 08:15:13 2024 +0200
CAMEL-21199: camel-jackson - Add useWriter option to allow 2/4-bytes chars
(such as japanese) to work with Jackson
---
.../springboot/catalog/dataformats/jackson.json | 33 +++++++++++-----------
.../springboot/catalog/dataformats/jacksonXml.json | 29 ++++++++++---------
.../src/main/docs/jackson.json | 7 +++++
.../springboot/JacksonDataFormatConfiguration.java | 14 +++++++++
.../src/main/docs/jacksonxml.json | 7 +++++
.../JacksonXMLDataFormatConfiguration.java | 14 +++++++++
6 files changed, 74 insertions(+), 30 deletions(-)
diff --git
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/dataformats/jackson.json
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/dataformats/jackson.json
index c11b82681ce..a69491779eb 100644
---
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/dataformats/jackson.json
+++
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/dataformats/jackson.json
@@ -21,21 +21,22 @@
"useDefaultObjectMapper": { "index": 2, "kind": "attribute",
"displayName": "Use Default Object Mapper", "group": "common", "required":
false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": true, "description":
"Whether to lookup and use default Jackson ObjectMapper from the registry." },
"autoDiscoverObjectMapper": { "index": 3, "kind": "attribute",
"displayName": "Auto Discover Object Mapper", "group": "common", "required":
false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": false, "description": "If
set to true then Jackson will look for an objectMapper to use from the
registry" },
"prettyPrint": { "index": 4, "kind": "attribute", "displayName": "Pretty
Print", "group": "common", "required": false, "type": "boolean", "javaType":
"java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "To enable pretty printing output nicely
formatted. Is by default false." },
- "unmarshalType": { "index": 5, "kind": "attribute", "displayName":
"Unmarshal Type", "group": "common", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "Class name of the java type to use when
unmarshalling" },
- "jsonView": { "index": 6, "kind": "attribute", "displayName": "Json View",
"group": "advanced", "label": "advanced", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "When marshalling a POJO to JSON you might want
to exclude certain fields from the JSON output. With Jackson you can use JSON
views to accomplish this. This option is to refer to the class which has
JsonView annotations" },
- "include": { "index": 7, "kind": "attribute", "displayName": "Include",
"group": "advanced", "label": "advanced", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "If you want to marshal a pojo to JSON, and the
pojo has some fields with null values. And you want to skip these null values,
you can set this option to NON_NULL" },
- "allowJmsType": { "index": 8, "kind": "attribute", "displayName": "Allow
Jms Type", "group": "advanced", "label": "advanced", "required": false, "type":
"boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired":
false, "secret": false, "defaultValue": false, "description": "Used for JMS
users to allow the JMSType header from the JMS spec to specify a FQN classname
to use to unmarshal to." },
- "collectionType": { "index": 9, "kind": "attribute", "displayName":
"Collection Type", "group": "advanced", "label": "advanced", "required": false,
"type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "description": "Refers to a custom
collection type to lookup in the registry to use. This option should rarely be
used, but allows using different collection types than java.util.Collection
based as default." },
- "useList": { "index": 10, "kind": "attribute", "displayName": "Use List",
"group": "common", "required": false, "type": "boolean", "javaType":
"java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "To unmarshal to a List of Map or a List
of Pojo." },
- "moduleClassNames": { "index": 11, "kind": "attribute", "displayName":
"Module Class Names", "group": "advanced", "label": "advanced", "required":
false, "type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "description": "To use custom Jackson
modules com.fasterxml.jackson.databind.Module specified as a String with FQN
class names. Multiple classes can be separated by comma." },
- "moduleRefs": { "index": 12, "kind": "attribute", "displayName": "Module
Refs", "group": "advanced", "label": "advanced", "required": false, "type":
"string", "javaType": "java.lang.String", "deprecated": false, "autowired":
false, "secret": false, "description": "To use custom Jackson modules referred
from the Camel registry. Multiple modules can be separated by comma." },
- "enableFeatures": { "index": 13, "kind": "attribute", "displayName":
"Enable Features", "group": "advanced", "label": "advanced", "required": false,
"type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "description": "Set of features to enable
on the Jackson com.fasterxml.jackson.databind.ObjectMapper. The features should
be a name that matches a enum from
com.fasterxml.jackson.databind.SerializationFeature, com.fasterxml.jackson [...]
- "disableFeatures": { "index": 14, "kind": "attribute", "displayName":
"Disable Features", "group": "advanced", "label": "advanced", "required":
false, "type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "description": "Set of features to disable
on the Jackson com.fasterxml.jackson.databind.ObjectMapper. The features should
be a name that matches a enum from
com.fasterxml.jackson.databind.SerializationFeature, com.fasterxml.jack [...]
- "allowUnmarshallType": { "index": 15, "kind": "attribute", "displayName":
"Allow Unmarshall Type", "group": "common", "required": false, "type":
"boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired":
false, "secret": false, "defaultValue": false, "description": "If enabled then
Jackson is allowed to attempt to use the CamelJacksonUnmarshalType header
during the unmarshalling. This should only be enabled when desired to be used."
},
- "timezone": { "index": 16, "kind": "attribute", "displayName": "Timezone",
"group": "advanced", "label": "advanced", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "If set then Jackson will use the Timezone when
marshalling\/unmarshalling. This option will have no effect on the others Json
DataFormat, like gson and fastjson." },
- "schemaResolver": { "index": 17, "kind": "attribute", "displayName":
"Schema Resolver", "group": "advanced", "label": "advanced", "required": false,
"type": "object", "javaType":
"org.apache.camel.component.jackson.SchemaResolver", "deprecated": false,
"autowired": false, "secret": false, "description": "Optional schema resolver
used to lookup schemas for the data in transit." },
- "autoDiscoverSchemaResolver": { "index": 18, "kind": "attribute",
"displayName": "Auto Discover Schema Resolver", "group": "advanced", "label":
"advanced", "required": false, "type": "boolean", "javaType":
"java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": true, "description": "When not disabled, the SchemaResolver
will be looked up into the registry" },
- "namingStrategy": { "index": 19, "kind": "attribute", "displayName":
"Naming Strategy", "group": "common", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "If set then Jackson will use the the defined
Property Naming Strategy.Possible values are: LOWER_CAMEL_CASE, LOWER_DOT_CASE,
LOWER_CASE, KEBAB_CASE, SNAKE_CASE and UPPER_CAMEL_CASE" },
- "contentTypeHeader": { "index": 20, "kind": "attribute", "displayName":
"Content Type Header", "group": "common", "required": false, "type": "boolean",
"javaType": "java.lang.Boolean", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": true, "description": "Whether the data format
should set the Content-Type header with the type from the data format. For
example application\/xml for data formats marshalling to XML, or
application\/json for data formats marshall [...]
+ "useWriter": { "index": 5, "kind": "attribute", "displayName": "Use
Writer", "group": "common", "required": false, "type": "boolean", "javaType":
"java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "Force using generator that outputs JSON
content using a java.io.Writer which handles character encoding. This should be
preferred when using 2-byte\/4-byte characters such as Japanese." },
+ "unmarshalType": { "index": 6, "kind": "attribute", "displayName":
"Unmarshal Type", "group": "common", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "Class name of the java type to use when
unmarshalling" },
+ "jsonView": { "index": 7, "kind": "attribute", "displayName": "Json View",
"group": "advanced", "label": "advanced", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "When marshalling a POJO to JSON you might want
to exclude certain fields from the JSON output. With Jackson you can use JSON
views to accomplish this. This option is to refer to the class which has
JsonView annotations" },
+ "include": { "index": 8, "kind": "attribute", "displayName": "Include",
"group": "advanced", "label": "advanced", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "If you want to marshal a pojo to JSON, and the
pojo has some fields with null values. And you want to skip these null values,
you can set this option to NON_NULL" },
+ "allowJmsType": { "index": 9, "kind": "attribute", "displayName": "Allow
Jms Type", "group": "advanced", "label": "advanced", "required": false, "type":
"boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired":
false, "secret": false, "defaultValue": false, "description": "Used for JMS
users to allow the JMSType header from the JMS spec to specify a FQN classname
to use to unmarshal to." },
+ "collectionType": { "index": 10, "kind": "attribute", "displayName":
"Collection Type", "group": "advanced", "label": "advanced", "required": false,
"type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "description": "Refers to a custom
collection type to lookup in the registry to use. This option should rarely be
used, but allows using different collection types than java.util.Collection
based as default." },
+ "useList": { "index": 11, "kind": "attribute", "displayName": "Use List",
"group": "common", "required": false, "type": "boolean", "javaType":
"java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "To unmarshal to a List of Map or a List
of Pojo." },
+ "moduleClassNames": { "index": 12, "kind": "attribute", "displayName":
"Module Class Names", "group": "advanced", "label": "advanced", "required":
false, "type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "description": "To use custom Jackson
modules com.fasterxml.jackson.databind.Module specified as a String with FQN
class names. Multiple classes can be separated by comma." },
+ "moduleRefs": { "index": 13, "kind": "attribute", "displayName": "Module
Refs", "group": "advanced", "label": "advanced", "required": false, "type":
"string", "javaType": "java.lang.String", "deprecated": false, "autowired":
false, "secret": false, "description": "To use custom Jackson modules referred
from the Camel registry. Multiple modules can be separated by comma." },
+ "enableFeatures": { "index": 14, "kind": "attribute", "displayName":
"Enable Features", "group": "advanced", "label": "advanced", "required": false,
"type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "description": "Set of features to enable
on the Jackson com.fasterxml.jackson.databind.ObjectMapper. The features should
be a name that matches a enum from
com.fasterxml.jackson.databind.SerializationFeature, com.fasterxml.jackson [...]
+ "disableFeatures": { "index": 15, "kind": "attribute", "displayName":
"Disable Features", "group": "advanced", "label": "advanced", "required":
false, "type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "description": "Set of features to disable
on the Jackson com.fasterxml.jackson.databind.ObjectMapper. The features should
be a name that matches a enum from
com.fasterxml.jackson.databind.SerializationFeature, com.fasterxml.jack [...]
+ "allowUnmarshallType": { "index": 16, "kind": "attribute", "displayName":
"Allow Unmarshall Type", "group": "common", "required": false, "type":
"boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired":
false, "secret": false, "defaultValue": false, "description": "If enabled then
Jackson is allowed to attempt to use the CamelJacksonUnmarshalType header
during the unmarshalling. This should only be enabled when desired to be used."
},
+ "timezone": { "index": 17, "kind": "attribute", "displayName": "Timezone",
"group": "advanced", "label": "advanced", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "If set then Jackson will use the Timezone when
marshalling\/unmarshalling. This option will have no effect on the others Json
DataFormat, like gson and fastjson." },
+ "schemaResolver": { "index": 18, "kind": "attribute", "displayName":
"Schema Resolver", "group": "advanced", "label": "advanced", "required": false,
"type": "object", "javaType":
"org.apache.camel.component.jackson.SchemaResolver", "deprecated": false,
"autowired": false, "secret": false, "description": "Optional schema resolver
used to lookup schemas for the data in transit." },
+ "autoDiscoverSchemaResolver": { "index": 19, "kind": "attribute",
"displayName": "Auto Discover Schema Resolver", "group": "advanced", "label":
"advanced", "required": false, "type": "boolean", "javaType":
"java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": true, "description": "When not disabled, the SchemaResolver
will be looked up into the registry" },
+ "namingStrategy": { "index": 20, "kind": "attribute", "displayName":
"Naming Strategy", "group": "common", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "If set then Jackson will use the the defined
Property Naming Strategy.Possible values are: LOWER_CAMEL_CASE, LOWER_DOT_CASE,
LOWER_CASE, KEBAB_CASE, SNAKE_CASE and UPPER_CAMEL_CASE" },
+ "contentTypeHeader": { "index": 21, "kind": "attribute", "displayName":
"Content Type Header", "group": "common", "required": false, "type": "boolean",
"javaType": "java.lang.Boolean", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": true, "description": "Whether the data format
should set the Content-Type header with the type from the data format. For
example application\/xml for data formats marshalling to XML, or
application\/json for data formats marshall [...]
}
}
diff --git
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/dataformats/jacksonXml.json
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/dataformats/jacksonXml.json
index 4e6d3e3c8d9..8d4155d1efa 100644
---
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/dataformats/jacksonXml.json
+++
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/dataformats/jacksonXml.json
@@ -19,19 +19,20 @@
"id": { "index": 0, "kind": "attribute", "displayName": "Id", "group":
"common", "required": false, "type": "string", "javaType": "java.lang.String",
"deprecated": false, "autowired": false, "secret": false, "description": "The
id of this node" },
"xmlMapper": { "index": 1, "kind": "attribute", "displayName": "Xml
Mapper", "group": "advanced", "label": "advanced", "required": false, "type":
"string", "javaType": "java.lang.String", "deprecated": false, "autowired":
false, "secret": false, "description": "Lookup and use the existing XmlMapper
with the given id." },
"prettyPrint": { "index": 2, "kind": "attribute", "displayName": "Pretty
Print", "group": "common", "required": false, "type": "boolean", "javaType":
"java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "To enable pretty printing output nicely
formatted. Is by default false." },
- "unmarshalType": { "index": 3, "kind": "attribute", "displayName":
"Unmarshal Type", "group": "common", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "Class name of the java type to use when
unmarshalling" },
- "allowUnmarshallType": { "index": 4, "kind": "attribute", "displayName":
"Allow Unmarshall Type", "group": "common", "required": false, "type":
"boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired":
false, "secret": false, "defaultValue": false, "description": "If enabled then
Jackson is allowed to attempt to use the CamelJacksonUnmarshalType header
during the unmarshalling. This should only be enabled when desired to be used."
},
- "jsonView": { "index": 5, "kind": "attribute", "displayName": "Json View",
"group": "common", "required": false, "type": "string", "javaType":
"java.lang.String", "deprecated": false, "autowired": false, "secret": false,
"description": "When marshalling a POJO to JSON you might want to exclude
certain fields from the JSON output. With Jackson you can use JSON views to
accomplish this. This option is to refer to the class which has JsonView
annotations" },
- "include": { "index": 6, "kind": "attribute", "displayName": "Include",
"group": "common", "required": false, "type": "string", "javaType":
"java.lang.String", "deprecated": false, "autowired": false, "secret": false,
"description": "If you want to marshal a pojo to JSON, and the pojo has some
fields with null values. And you want to skip these null values, you can set
this option to NON_NULL" },
- "allowJmsType": { "index": 7, "kind": "attribute", "displayName": "Allow
Jms Type", "group": "advanced", "label": "advanced", "required": false, "type":
"boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired":
false, "secret": false, "defaultValue": false, "description": "Used for JMS
users to allow the JMSType header from the JMS spec to specify a FQN classname
to use to unmarshal to." },
- "collectionType": { "index": 8, "kind": "attribute", "displayName":
"Collection Type", "group": "advanced", "label": "advanced", "required": false,
"type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "description": "Refers to a custom
collection type to lookup in the registry to use. This option should rarely be
used, but allows to use different collection types than java.util.Collection
based as default." },
- "useList": { "index": 9, "kind": "attribute", "displayName": "Use List",
"group": "common", "required": false, "type": "boolean", "javaType":
"java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "To unmarshal to a List of Map or a List
of Pojo." },
- "timezone": { "index": 10, "kind": "attribute", "displayName": "Timezone",
"group": "advanced", "label": "advanced", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "If set then Jackson will use the Timezone when
marshalling\/unmarshalling." },
- "enableJaxbAnnotationModule": { "index": 11, "kind": "attribute",
"displayName": "Enable Jaxb Annotation Module", "group": "advanced", "label":
"advanced", "required": false, "type": "boolean", "javaType":
"java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "Whether to enable the JAXB annotations
module when using jackson. When enabled then JAXB annotations can be used by
Jackson." },
- "moduleClassNames": { "index": 12, "kind": "attribute", "displayName":
"Module Class Names", "group": "advanced", "label": "advanced", "required":
false, "type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "description": "To use custom Jackson
modules com.fasterxml.jackson.databind.Module specified as a String with FQN
class names. Multiple classes can be separated by comma." },
- "moduleRefs": { "index": 13, "kind": "attribute", "displayName": "Module
Refs", "group": "advanced", "label": "advanced", "required": false, "type":
"string", "javaType": "java.lang.String", "deprecated": false, "autowired":
false, "secret": false, "description": "To use custom Jackson modules referred
from the Camel registry. Multiple modules can be separated by comma." },
- "enableFeatures": { "index": 14, "kind": "attribute", "displayName":
"Enable Features", "group": "common", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "Set of features to enable on the Jackson
com.fasterxml.jackson.databind.ObjectMapper. The features should be a name that
matches a enum from com.fasterxml.jackson.databind.SerializationFeature,
com.fasterxml.jackson.databind.Deserializati [...]
- "disableFeatures": { "index": 15, "kind": "attribute", "displayName":
"Disable Features", "group": "common", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "Set of features to disable on the Jackson
com.fasterxml.jackson.databind.ObjectMapper. The features should be a name that
matches a enum from com.fasterxml.jackson.databind.SerializationFeature,
com.fasterxml.jackson.databind.Deserializ [...]
- "contentTypeHeader": { "index": 16, "kind": "attribute", "displayName":
"Content Type Header", "group": "common", "required": false, "type": "boolean",
"javaType": "java.lang.Boolean", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": true, "description": "Whether the data format
should set the Content-Type header with the type from the data format. For
example application\/xml for data formats marshalling to XML, or
application\/json for data formats marshall [...]
+ "useWriter": { "index": 3, "kind": "attribute", "displayName": "Use
Writer", "group": "common", "required": false, "type": "boolean", "javaType":
"java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "Force using generator that outputs XML
content using a java.io.Writer which handles character encoding. This should be
preferred when using 2-byte\/4-byte characters such as Japanese." },
+ "unmarshalType": { "index": 4, "kind": "attribute", "displayName":
"Unmarshal Type", "group": "common", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "Class name of the java type to use when
unmarshalling" },
+ "allowUnmarshallType": { "index": 5, "kind": "attribute", "displayName":
"Allow Unmarshall Type", "group": "common", "required": false, "type":
"boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired":
false, "secret": false, "defaultValue": false, "description": "If enabled then
Jackson is allowed to attempt to use the CamelJacksonUnmarshalType header
during the unmarshalling. This should only be enabled when desired to be used."
},
+ "jsonView": { "index": 6, "kind": "attribute", "displayName": "Json View",
"group": "common", "required": false, "type": "string", "javaType":
"java.lang.String", "deprecated": false, "autowired": false, "secret": false,
"description": "When marshalling a POJO to JSON you might want to exclude
certain fields from the JSON output. With Jackson you can use JSON views to
accomplish this. This option is to refer to the class which has JsonView
annotations" },
+ "include": { "index": 7, "kind": "attribute", "displayName": "Include",
"group": "common", "required": false, "type": "string", "javaType":
"java.lang.String", "deprecated": false, "autowired": false, "secret": false,
"description": "If you want to marshal a pojo to JSON, and the pojo has some
fields with null values. And you want to skip these null values, you can set
this option to NON_NULL" },
+ "allowJmsType": { "index": 8, "kind": "attribute", "displayName": "Allow
Jms Type", "group": "advanced", "label": "advanced", "required": false, "type":
"boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired":
false, "secret": false, "defaultValue": false, "description": "Used for JMS
users to allow the JMSType header from the JMS spec to specify a FQN classname
to use to unmarshal to." },
+ "collectionType": { "index": 9, "kind": "attribute", "displayName":
"Collection Type", "group": "advanced", "label": "advanced", "required": false,
"type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "description": "Refers to a custom
collection type to lookup in the registry to use. This option should rarely be
used, but allows to use different collection types than java.util.Collection
based as default." },
+ "useList": { "index": 10, "kind": "attribute", "displayName": "Use List",
"group": "common", "required": false, "type": "boolean", "javaType":
"java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "To unmarshal to a List of Map or a List
of Pojo." },
+ "timezone": { "index": 11, "kind": "attribute", "displayName": "Timezone",
"group": "advanced", "label": "advanced", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "If set then Jackson will use the Timezone when
marshalling\/unmarshalling." },
+ "enableJaxbAnnotationModule": { "index": 12, "kind": "attribute",
"displayName": "Enable Jaxb Annotation Module", "group": "advanced", "label":
"advanced", "required": false, "type": "boolean", "javaType":
"java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "Whether to enable the JAXB annotations
module when using jackson. When enabled then JAXB annotations can be used by
Jackson." },
+ "moduleClassNames": { "index": 13, "kind": "attribute", "displayName":
"Module Class Names", "group": "advanced", "label": "advanced", "required":
false, "type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "description": "To use custom Jackson
modules com.fasterxml.jackson.databind.Module specified as a String with FQN
class names. Multiple classes can be separated by comma." },
+ "moduleRefs": { "index": 14, "kind": "attribute", "displayName": "Module
Refs", "group": "advanced", "label": "advanced", "required": false, "type":
"string", "javaType": "java.lang.String", "deprecated": false, "autowired":
false, "secret": false, "description": "To use custom Jackson modules referred
from the Camel registry. Multiple modules can be separated by comma." },
+ "enableFeatures": { "index": 15, "kind": "attribute", "displayName":
"Enable Features", "group": "common", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "Set of features to enable on the Jackson
com.fasterxml.jackson.databind.ObjectMapper. The features should be a name that
matches a enum from com.fasterxml.jackson.databind.SerializationFeature,
com.fasterxml.jackson.databind.Deserializati [...]
+ "disableFeatures": { "index": 16, "kind": "attribute", "displayName":
"Disable Features", "group": "common", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "Set of features to disable on the Jackson
com.fasterxml.jackson.databind.ObjectMapper. The features should be a name that
matches a enum from com.fasterxml.jackson.databind.SerializationFeature,
com.fasterxml.jackson.databind.Deserializ [...]
+ "contentTypeHeader": { "index": 17, "kind": "attribute", "displayName":
"Content Type Header", "group": "common", "required": false, "type": "boolean",
"javaType": "java.lang.Boolean", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": true, "description": "Whether the data format
should set the Content-Type header with the type from the data format. For
example application\/xml for data formats marshalling to XML, or
application\/json for data formats marshall [...]
}
}
diff --git
a/components-starter/camel-jackson-starter/src/main/docs/jackson.json
b/components-starter/camel-jackson-starter/src/main/docs/jackson.json
index 60b9421489a..ffb271661f3 100644
--- a/components-starter/camel-jackson-starter/src/main/docs/jackson.json
+++ b/components-starter/camel-jackson-starter/src/main/docs/jackson.json
@@ -151,6 +151,13 @@
"description": "To unmarshal to a List of Map or a List of Pojo.",
"sourceType":
"org.apache.camel.component.jackson.springboot.JacksonDataFormatConfiguration",
"defaultValue": false
+ },
+ {
+ "name": "camel.dataformat.jackson.use-writer",
+ "type": "java.lang.Boolean",
+ "description": "Force using generator that outputs JSON content using a
java.io.Writer which handles character encoding. This should be preferred when
using 2-byte\/4-byte characters such as Japanese.",
+ "sourceType":
"org.apache.camel.component.jackson.springboot.JacksonDataFormatConfiguration",
+ "defaultValue": false
}
],
"hints": []
diff --git
a/components-starter/camel-jackson-starter/src/main/java/org/apache/camel/component/jackson/springboot/JacksonDataFormatConfiguration.java
b/components-starter/camel-jackson-starter/src/main/java/org/apache/camel/component/jackson/springboot/JacksonDataFormatConfiguration.java
index d3cc4a8d27f..3b82ecad65f 100644
---
a/components-starter/camel-jackson-starter/src/main/java/org/apache/camel/component/jackson/springboot/JacksonDataFormatConfiguration.java
+++
b/components-starter/camel-jackson-starter/src/main/java/org/apache/camel/component/jackson/springboot/JacksonDataFormatConfiguration.java
@@ -52,6 +52,12 @@ public class JacksonDataFormatConfiguration
* To enable pretty printing output nicely formatted. Is by default false.
*/
private Boolean prettyPrint = false;
+ /**
+ * Force using generator that outputs JSON content using a java.io.Writer
+ * which handles character encoding. This should be preferred when using
+ * 2-byte/4-byte characters such as Japanese.
+ */
+ private Boolean useWriter = false;
/**
* Class name of the java type to use when unmarshalling
*/
@@ -181,6 +187,14 @@ public class JacksonDataFormatConfiguration
this.prettyPrint = prettyPrint;
}
+ public Boolean getUseWriter() {
+ return useWriter;
+ }
+
+ public void setUseWriter(Boolean useWriter) {
+ this.useWriter = useWriter;
+ }
+
public String getUnmarshalType() {
return unmarshalType;
}
diff --git
a/components-starter/camel-jacksonxml-starter/src/main/docs/jacksonxml.json
b/components-starter/camel-jacksonxml-starter/src/main/docs/jacksonxml.json
index 9e67dfd0c26..bdb3c0fea47 100644
--- a/components-starter/camel-jacksonxml-starter/src/main/docs/jacksonxml.json
+++ b/components-starter/camel-jacksonxml-starter/src/main/docs/jacksonxml.json
@@ -120,6 +120,13 @@
"sourceType":
"org.apache.camel.component.jacksonxml.springboot.JacksonXMLDataFormatConfiguration",
"defaultValue": false
},
+ {
+ "name": "camel.dataformat.jackson-xml.use-writer",
+ "type": "java.lang.Boolean",
+ "description": "Force using generator that outputs XML content using a
java.io.Writer which handles character encoding. This should be preferred when
using 2-byte\/4-byte characters such as Japanese.",
+ "sourceType":
"org.apache.camel.component.jacksonxml.springboot.JacksonXMLDataFormatConfiguration",
+ "defaultValue": false
+ },
{
"name": "camel.dataformat.jackson-xml.xml-mapper",
"type": "java.lang.String",
diff --git
a/components-starter/camel-jacksonxml-starter/src/main/java/org/apache/camel/component/jacksonxml/springboot/JacksonXMLDataFormatConfiguration.java
b/components-starter/camel-jacksonxml-starter/src/main/java/org/apache/camel/component/jacksonxml/springboot/JacksonXMLDataFormatConfiguration.java
index 53509c6a55d..ea9c211b433 100644
---
a/components-starter/camel-jacksonxml-starter/src/main/java/org/apache/camel/component/jacksonxml/springboot/JacksonXMLDataFormatConfiguration.java
+++
b/components-starter/camel-jacksonxml-starter/src/main/java/org/apache/camel/component/jacksonxml/springboot/JacksonXMLDataFormatConfiguration.java
@@ -43,6 +43,12 @@ public class JacksonXMLDataFormatConfiguration
* To enable pretty printing output nicely formatted. Is by default false.
*/
private Boolean prettyPrint = false;
+ /**
+ * Force using generator that outputs XML content using a java.io.Writer
+ * which handles character encoding. This should be preferred when using
+ * 2-byte/4-byte characters such as Japanese.
+ */
+ private Boolean useWriter = false;
/**
* Class name of the java type to use when unmarshalling
*/
@@ -144,6 +150,14 @@ public class JacksonXMLDataFormatConfiguration
this.prettyPrint = prettyPrint;
}
+ public Boolean getUseWriter() {
+ return useWriter;
+ }
+
+ public void setUseWriter(Boolean useWriter) {
+ this.useWriter = useWriter;
+ }
+
public String getUnmarshalType() {
return unmarshalType;
}