You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2020/03/19 12:58:29 UTC

[camel] branch master updated (82f8b67 -> 9da9495)

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git.


    from 82f8b67  CAMEL-14679: Support DROP_ROOT_MODE in XStream JSON dataformat
     new a8e9962  CAMEL-14679: Support DROP_ROOT_MODE in XStream JSON dataformat
     new 9da9495  CAMEL-14741: The FluentProducerTemplate.withTemplateCustomizer is broken

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../org/apache/camel/component/fastjson/json-fastjson.json   |  1 +
 .../src/main/docs/json-fastjson-dataformat.adoc              |  3 ++-
 .../resources/org/apache/camel/component/gson/json-gson.json |  1 +
 .../camel-gson/src/main/docs/json-gson-dataformat.adoc       |  3 ++-
 .../org/apache/camel/component/jackson/json-jackson.json     |  1 +
 .../camel-jackson/src/main/docs/json-jackson-dataformat.adoc |  3 ++-
 .../org/apache/camel/component/johnzon/json-johnzon.json     |  1 +
 .../camel-johnzon/src/main/docs/json-johnzon-dataformat.adoc |  3 ++-
 .../main/java/org/apache/camel/FluentProducerTemplate.java   | 12 ++++++------
 .../camel/impl/engine/DefaultFluentProducerTemplate.java     | 12 ++++++++++++
 .../org/apache/camel/builder/FluentProducerTemplateTest.java | 11 +++++++++++
 .../modules/dataformats/pages/json-fastjson-dataformat.adoc  |  3 ++-
 .../modules/dataformats/pages/json-gson-dataformat.adoc      |  3 ++-
 .../modules/dataformats/pages/json-jackson-dataformat.adoc   |  3 ++-
 .../modules/dataformats/pages/json-johnzon-dataformat.adoc   |  3 ++-
 15 files changed, 49 insertions(+), 14 deletions(-)


[camel] 02/02: CAMEL-14741: The FluentProducerTemplate.withTemplateCustomizer is broken

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 9da9495feb617f319e27dbb82aa396c6d909e676
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Thu Mar 19 13:45:00 2020 +0100

    CAMEL-14741: The FluentProducerTemplate.withTemplateCustomizer is broken
---
 .../main/java/org/apache/camel/FluentProducerTemplate.java   | 12 ++++++------
 .../camel/impl/engine/DefaultFluentProducerTemplate.java     | 12 ++++++++++++
 .../org/apache/camel/builder/FluentProducerTemplateTest.java | 11 +++++++++++
 3 files changed, 29 insertions(+), 6 deletions(-)

diff --git a/core/camel-api/src/main/java/org/apache/camel/FluentProducerTemplate.java b/core/camel-api/src/main/java/org/apache/camel/FluentProducerTemplate.java
index 87a00ab..9175510 100644
--- a/core/camel-api/src/main/java/org/apache/camel/FluentProducerTemplate.java
+++ b/core/camel-api/src/main/java/org/apache/camel/FluentProducerTemplate.java
@@ -182,16 +182,16 @@ public interface FluentProducerTemplate extends Service {
      *
      * <pre>
      * {@code
-     * FluentProducerTemplate.on(context)
-     *     .withTemplateCustomizer(
-     *         template -> {
-     *             template.setExecutorService(myExecutor);
-     *             template.setMaximumCacheSize(10);
+     * FluentProducerTemplate fluent = context.createFluentProducerTemplate();
+     * fluent.withTemplateCustomizer(
+     *         t -> {
+     *             t.setExecutorService(myExecutor);
+     *             t.setMaximumCacheSize(10);
      *         }
      *      )
      *     .withBody("the body")
      *     .to("direct:start")
-     *     .request()}
+     *     .send()}
      * </pre>
      *
      * Note that it is invoked only once.
diff --git a/core/camel-base/src/main/java/org/apache/camel/impl/engine/DefaultFluentProducerTemplate.java b/core/camel-base/src/main/java/org/apache/camel/impl/engine/DefaultFluentProducerTemplate.java
index 9a19e65..74dda14 100644
--- a/core/camel-base/src/main/java/org/apache/camel/impl/engine/DefaultFluentProducerTemplate.java
+++ b/core/camel-base/src/main/java/org/apache/camel/impl/engine/DefaultFluentProducerTemplate.java
@@ -177,6 +177,14 @@ public class DefaultFluentProducerTemplate extends ServiceSupport implements Flu
     @Override
     public FluentProducerTemplate withTemplateCustomizer(final Consumer<ProducerTemplate> templateCustomizer) {
         this.templateCustomizer.set(templateCustomizer);
+
+        if (template != null) {
+            // need to re-initialize template since we have a customizer
+            ServiceHelper.stopService(template);
+            templateCustomizer.accept(template);
+            ServiceHelper.startService(template);
+        }
+
         return this;
     }
 
@@ -374,6 +382,10 @@ public class DefaultFluentProducerTemplate extends ServiceSupport implements Flu
             return defaultEndpoint;
         }
 
+        if (template != null && template.getDefaultEndpoint() != null) {
+            return template.getDefaultEndpoint();
+        }
+
         throw new IllegalArgumentException("No endpoint configured on FluentProducerTemplate. You can configure an endpoint with to(uri)");
     }
 
diff --git a/core/camel-core/src/test/java/org/apache/camel/builder/FluentProducerTemplateTest.java b/core/camel-core/src/test/java/org/apache/camel/builder/FluentProducerTemplateTest.java
index d4b3f7f..d3922c1 100644
--- a/core/camel-core/src/test/java/org/apache/camel/builder/FluentProducerTemplateTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/builder/FluentProducerTemplateTest.java
@@ -329,6 +329,17 @@ public class FluentProducerTemplateTest extends ContextTestSupport {
         assertEquals("body-2", exchange2.getIn().getBody(String.class));
     }
 
+    @Test
+    public void testWithCustomizer() throws Exception {
+        getMockEndpoint("mock:custom").expectedBodiesReceived("Hello World");
+
+        FluentProducerTemplate fluent = context.createFluentProducerTemplate().withTemplateCustomizer(t -> t.setDefaultEndpointUri("mock:custom"));
+
+        fluent.withBody("Hello World").send();
+
+        assertMockEndpointsSatisfied();
+    }
+
     @Override
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {


[camel] 01/02: CAMEL-14679: Support DROP_ROOT_MODE in XStream JSON dataformat

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit a8e99624e840e74f84bc5cf02d1616c1b194bc15
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Thu Mar 19 13:44:33 2020 +0100

    CAMEL-14679: Support DROP_ROOT_MODE in XStream JSON dataformat
---
 .../resources/org/apache/camel/component/fastjson/json-fastjson.json   | 1 +
 components/camel-fastjson/src/main/docs/json-fastjson-dataformat.adoc  | 3 ++-
 .../generated/resources/org/apache/camel/component/gson/json-gson.json | 1 +
 components/camel-gson/src/main/docs/json-gson-dataformat.adoc          | 3 ++-
 .../resources/org/apache/camel/component/jackson/json-jackson.json     | 1 +
 components/camel-jackson/src/main/docs/json-jackson-dataformat.adoc    | 3 ++-
 .../resources/org/apache/camel/component/johnzon/json-johnzon.json     | 1 +
 components/camel-johnzon/src/main/docs/json-johnzon-dataformat.adoc    | 3 ++-
 .../components/modules/dataformats/pages/json-fastjson-dataformat.adoc | 3 ++-
 docs/components/modules/dataformats/pages/json-gson-dataformat.adoc    | 3 ++-
 docs/components/modules/dataformats/pages/json-jackson-dataformat.adoc | 3 ++-
 docs/components/modules/dataformats/pages/json-johnzon-dataformat.adoc | 3 ++-
 12 files changed, 20 insertions(+), 8 deletions(-)

diff --git a/components/camel-fastjson/src/generated/resources/org/apache/camel/component/fastjson/json-fastjson.json b/components/camel-fastjson/src/generated/resources/org/apache/camel/component/fastjson/json-fastjson.json
index b0606c4..6fac152 100644
--- a/components/camel-fastjson/src/generated/resources/org/apache/camel/component/fastjson/json-fastjson.json
+++ b/components/camel-fastjson/src/generated/resources/org/apache/camel/component/fastjson/json-fastjson.json
@@ -35,6 +35,7 @@
     "allowUnmarshallType": { "kind": "attribute", "displayName": "Allow Unmarshall Type", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": 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": { "kind": "attribute", "displayName": "Timezone", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": 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, fastjson and xstream." },
     "autoDiscoverObjectMapper": { "kind": "attribute", "displayName": "Auto Discover Object Mapper", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "If set to true then Jackson will lookup for an objectMapper into the registry" },
+    "dropRootNode": { "kind": "attribute", "displayName": "Drop Root Node", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether XStream will drop the root node in the generated JSon. You may want to enable this when using POJOs; as then the written object will include the class name as root node, which is often not intended to be written in the JSon output." },
     "contentTypeHeader": { "kind": "attribute", "displayName": "Content Type Header", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the data format should set the Content-Type header with the type from the data format if the data format is capable of doing so. For example application\/xml for data formats marshalling to XML, or application\/json for data formats marshalling to JS [...]
     "id": { "kind": "attribute", "displayName": "Id", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "description": "The id of this node" }
   }
diff --git a/components/camel-fastjson/src/main/docs/json-fastjson-dataformat.adoc b/components/camel-fastjson/src/main/docs/json-fastjson-dataformat.adoc
index 3d07cc1..c2f2219 100644
--- a/components/camel-fastjson/src/main/docs/json-fastjson-dataformat.adoc
+++ b/components/camel-fastjson/src/main/docs/json-fastjson-dataformat.adoc
@@ -17,7 +17,7 @@ from("activemq:My.Queue").
 
 
 // dataformat options: START
-The JSon Fastjson dataformat supports 20 options, which are listed below.
+The JSon Fastjson dataformat supports 21 options, which are listed below.
 
 
 
@@ -43,6 +43,7 @@ The JSon Fastjson dataformat supports 20 options, which are listed below.
 | allowUnmarshallType | false | Boolean | 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 |  | String | If set then Jackson will use the Timezone when marshalling/unmarshalling. This option will have no effect on the others Json DataFormat, like gson, fastjson and xstream.
 | autoDiscoverObjectMapper | false | Boolean | If set to true then Jackson will lookup for an objectMapper into the registry
+| dropRootNode | false | Boolean | Whether XStream will drop the root node in the generated JSon. You may want to enable this when using POJOs; as then the written object will include the class name as root node, which is often not intended to be written in the JSon output.
 | contentTypeHeader | false | Boolean | Whether the data format should set the Content-Type header with the type from the data format if the data format is capable of doing so. For example application/xml for data formats marshalling to XML, or application/json for data formats marshalling to JSon etc.
 |===
 // dataformat options: END
diff --git a/components/camel-gson/src/generated/resources/org/apache/camel/component/gson/json-gson.json b/components/camel-gson/src/generated/resources/org/apache/camel/component/gson/json-gson.json
index 43b4e7b..afdf10a 100644
--- a/components/camel-gson/src/generated/resources/org/apache/camel/component/gson/json-gson.json
+++ b/components/camel-gson/src/generated/resources/org/apache/camel/component/gson/json-gson.json
@@ -35,6 +35,7 @@
     "allowUnmarshallType": { "kind": "attribute", "displayName": "Allow Unmarshall Type", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": 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": { "kind": "attribute", "displayName": "Timezone", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": 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, fastjson and xstream." },
     "autoDiscoverObjectMapper": { "kind": "attribute", "displayName": "Auto Discover Object Mapper", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "If set to true then Jackson will lookup for an objectMapper into the registry" },
+    "dropRootNode": { "kind": "attribute", "displayName": "Drop Root Node", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether XStream will drop the root node in the generated JSon. You may want to enable this when using POJOs; as then the written object will include the class name as root node, which is often not intended to be written in the JSon output." },
     "contentTypeHeader": { "kind": "attribute", "displayName": "Content Type Header", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the data format should set the Content-Type header with the type from the data format if the data format is capable of doing so. For example application\/xml for data formats marshalling to XML, or application\/json for data formats marshalling to JS [...]
     "id": { "kind": "attribute", "displayName": "Id", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "description": "The id of this node" }
   }
diff --git a/components/camel-gson/src/main/docs/json-gson-dataformat.adoc b/components/camel-gson/src/main/docs/json-gson-dataformat.adoc
index 31cd6a7..661a4cb 100644
--- a/components/camel-gson/src/main/docs/json-gson-dataformat.adoc
+++ b/components/camel-gson/src/main/docs/json-gson-dataformat.adoc
@@ -17,7 +17,7 @@ from("activemq:My.Queue").
 
 
 // dataformat options: START
-The JSon GSon dataformat supports 20 options, which are listed below.
+The JSon GSon dataformat supports 21 options, which are listed below.
 
 
 
@@ -43,6 +43,7 @@ The JSon GSon dataformat supports 20 options, which are listed below.
 | allowUnmarshallType | false | Boolean | 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 |  | String | If set then Jackson will use the Timezone when marshalling/unmarshalling. This option will have no effect on the others Json DataFormat, like gson, fastjson and xstream.
 | autoDiscoverObjectMapper | false | Boolean | If set to true then Jackson will lookup for an objectMapper into the registry
+| dropRootNode | false | Boolean | Whether XStream will drop the root node in the generated JSon. You may want to enable this when using POJOs; as then the written object will include the class name as root node, which is often not intended to be written in the JSon output.
 | contentTypeHeader | false | Boolean | Whether the data format should set the Content-Type header with the type from the data format if the data format is capable of doing so. For example application/xml for data formats marshalling to XML, or application/json for data formats marshalling to JSon etc.
 |===
 // dataformat options: END
diff --git a/components/camel-jackson/src/generated/resources/org/apache/camel/component/jackson/json-jackson.json b/components/camel-jackson/src/generated/resources/org/apache/camel/component/jackson/json-jackson.json
index 109ff4d..bec16f9 100644
--- a/components/camel-jackson/src/generated/resources/org/apache/camel/component/jackson/json-jackson.json
+++ b/components/camel-jackson/src/generated/resources/org/apache/camel/component/jackson/json-jackson.json
@@ -35,6 +35,7 @@
     "allowUnmarshallType": { "kind": "attribute", "displayName": "Allow Unmarshall Type", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": 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": { "kind": "attribute", "displayName": "Timezone", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": 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, fastjson and xstream." },
     "autoDiscoverObjectMapper": { "kind": "attribute", "displayName": "Auto Discover Object Mapper", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "If set to true then Jackson will lookup for an objectMapper into the registry" },
+    "dropRootNode": { "kind": "attribute", "displayName": "Drop Root Node", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether XStream will drop the root node in the generated JSon. You may want to enable this when using POJOs; as then the written object will include the class name as root node, which is often not intended to be written in the JSon output." },
     "contentTypeHeader": { "kind": "attribute", "displayName": "Content Type Header", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the data format should set the Content-Type header with the type from the data format if the data format is capable of doing so. For example application\/xml for data formats marshalling to XML, or application\/json for data formats marshalling to JS [...]
     "id": { "kind": "attribute", "displayName": "Id", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "description": "The id of this node" }
   }
diff --git a/components/camel-jackson/src/main/docs/json-jackson-dataformat.adoc b/components/camel-jackson/src/main/docs/json-jackson-dataformat.adoc
index 8e8e06f..72e7d6b 100644
--- a/components/camel-jackson/src/main/docs/json-jackson-dataformat.adoc
+++ b/components/camel-jackson/src/main/docs/json-jackson-dataformat.adoc
@@ -18,7 +18,7 @@ from("activemq:My.Queue").
 
 
 // dataformat options: START
-The JSon Jackson dataformat supports 20 options, which are listed below.
+The JSon Jackson dataformat supports 21 options, which are listed below.
 
 
 
@@ -44,6 +44,7 @@ The JSon Jackson dataformat supports 20 options, which are listed below.
 | allowUnmarshallType | false | Boolean | 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 |  | String | If set then Jackson will use the Timezone when marshalling/unmarshalling. This option will have no effect on the others Json DataFormat, like gson, fastjson and xstream.
 | autoDiscoverObjectMapper | false | Boolean | If set to true then Jackson will lookup for an objectMapper into the registry
+| dropRootNode | false | Boolean | Whether XStream will drop the root node in the generated JSon. You may want to enable this when using POJOs; as then the written object will include the class name as root node, which is often not intended to be written in the JSon output.
 | contentTypeHeader | false | Boolean | Whether the data format should set the Content-Type header with the type from the data format if the data format is capable of doing so. For example application/xml for data formats marshalling to XML, or application/json for data formats marshalling to JSon etc.
 |===
 // dataformat options: END
diff --git a/components/camel-johnzon/src/generated/resources/org/apache/camel/component/johnzon/json-johnzon.json b/components/camel-johnzon/src/generated/resources/org/apache/camel/component/johnzon/json-johnzon.json
index 9bea8bc..03e444a 100644
--- a/components/camel-johnzon/src/generated/resources/org/apache/camel/component/johnzon/json-johnzon.json
+++ b/components/camel-johnzon/src/generated/resources/org/apache/camel/component/johnzon/json-johnzon.json
@@ -35,6 +35,7 @@
     "allowUnmarshallType": { "kind": "attribute", "displayName": "Allow Unmarshall Type", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": 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": { "kind": "attribute", "displayName": "Timezone", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": 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, fastjson and xstream." },
     "autoDiscoverObjectMapper": { "kind": "attribute", "displayName": "Auto Discover Object Mapper", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "If set to true then Jackson will lookup for an objectMapper into the registry" },
+    "dropRootNode": { "kind": "attribute", "displayName": "Drop Root Node", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether XStream will drop the root node in the generated JSon. You may want to enable this when using POJOs; as then the written object will include the class name as root node, which is often not intended to be written in the JSon output." },
     "contentTypeHeader": { "kind": "attribute", "displayName": "Content Type Header", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the data format should set the Content-Type header with the type from the data format if the data format is capable of doing so. For example application\/xml for data formats marshalling to XML, or application\/json for data formats marshalling to JS [...]
     "id": { "kind": "attribute", "displayName": "Id", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "description": "The id of this node" }
   }
diff --git a/components/camel-johnzon/src/main/docs/json-johnzon-dataformat.adoc b/components/camel-johnzon/src/main/docs/json-johnzon-dataformat.adoc
index 115544c..9a8deb2 100644
--- a/components/camel-johnzon/src/main/docs/json-johnzon-dataformat.adoc
+++ b/components/camel-johnzon/src/main/docs/json-johnzon-dataformat.adoc
@@ -18,7 +18,7 @@ from("activemq:My.Queue").
 
 
 // dataformat options: START
-The JSon Johnzon dataformat supports 20 options, which are listed below.
+The JSon Johnzon dataformat supports 21 options, which are listed below.
 
 
 
@@ -44,6 +44,7 @@ The JSon Johnzon dataformat supports 20 options, which are listed below.
 | allowUnmarshallType | false | Boolean | 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 |  | String | If set then Jackson will use the Timezone when marshalling/unmarshalling. This option will have no effect on the others Json DataFormat, like gson, fastjson and xstream.
 | autoDiscoverObjectMapper | false | Boolean | If set to true then Jackson will lookup for an objectMapper into the registry
+| dropRootNode | false | Boolean | Whether XStream will drop the root node in the generated JSon. You may want to enable this when using POJOs; as then the written object will include the class name as root node, which is often not intended to be written in the JSon output.
 | contentTypeHeader | false | Boolean | Whether the data format should set the Content-Type header with the type from the data format if the data format is capable of doing so. For example application/xml for data formats marshalling to XML, or application/json for data formats marshalling to JSon etc.
 |===
 // dataformat options: END
diff --git a/docs/components/modules/dataformats/pages/json-fastjson-dataformat.adoc b/docs/components/modules/dataformats/pages/json-fastjson-dataformat.adoc
index 6322dc1..eb94e26 100644
--- a/docs/components/modules/dataformats/pages/json-fastjson-dataformat.adoc
+++ b/docs/components/modules/dataformats/pages/json-fastjson-dataformat.adoc
@@ -18,7 +18,7 @@ from("activemq:My.Queue").
 
 
 // dataformat options: START
-The JSon Fastjson dataformat supports 20 options, which are listed below.
+The JSon Fastjson dataformat supports 21 options, which are listed below.
 
 
 
@@ -44,6 +44,7 @@ The JSon Fastjson dataformat supports 20 options, which are listed below.
 | allowUnmarshallType | false | Boolean | 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 |  | String | If set then Jackson will use the Timezone when marshalling/unmarshalling. This option will have no effect on the others Json DataFormat, like gson, fastjson and xstream.
 | autoDiscoverObjectMapper | false | Boolean | If set to true then Jackson will lookup for an objectMapper into the registry
+| dropRootNode | false | Boolean | Whether XStream will drop the root node in the generated JSon. You may want to enable this when using POJOs; as then the written object will include the class name as root node, which is often not intended to be written in the JSon output.
 | contentTypeHeader | false | Boolean | Whether the data format should set the Content-Type header with the type from the data format if the data format is capable of doing so. For example application/xml for data formats marshalling to XML, or application/json for data formats marshalling to JSon etc.
 |===
 // dataformat options: END
diff --git a/docs/components/modules/dataformats/pages/json-gson-dataformat.adoc b/docs/components/modules/dataformats/pages/json-gson-dataformat.adoc
index ce4ce35..86a7c5e 100644
--- a/docs/components/modules/dataformats/pages/json-gson-dataformat.adoc
+++ b/docs/components/modules/dataformats/pages/json-gson-dataformat.adoc
@@ -18,7 +18,7 @@ from("activemq:My.Queue").
 
 
 // dataformat options: START
-The JSon GSon dataformat supports 20 options, which are listed below.
+The JSon GSon dataformat supports 21 options, which are listed below.
 
 
 
@@ -44,6 +44,7 @@ The JSon GSon dataformat supports 20 options, which are listed below.
 | allowUnmarshallType | false | Boolean | 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 |  | String | If set then Jackson will use the Timezone when marshalling/unmarshalling. This option will have no effect on the others Json DataFormat, like gson, fastjson and xstream.
 | autoDiscoverObjectMapper | false | Boolean | If set to true then Jackson will lookup for an objectMapper into the registry
+| dropRootNode | false | Boolean | Whether XStream will drop the root node in the generated JSon. You may want to enable this when using POJOs; as then the written object will include the class name as root node, which is often not intended to be written in the JSon output.
 | contentTypeHeader | false | Boolean | Whether the data format should set the Content-Type header with the type from the data format if the data format is capable of doing so. For example application/xml for data formats marshalling to XML, or application/json for data formats marshalling to JSon etc.
 |===
 // dataformat options: END
diff --git a/docs/components/modules/dataformats/pages/json-jackson-dataformat.adoc b/docs/components/modules/dataformats/pages/json-jackson-dataformat.adoc
index b9e3c61..0544c3c 100644
--- a/docs/components/modules/dataformats/pages/json-jackson-dataformat.adoc
+++ b/docs/components/modules/dataformats/pages/json-jackson-dataformat.adoc
@@ -19,7 +19,7 @@ from("activemq:My.Queue").
 
 
 // dataformat options: START
-The JSon Jackson dataformat supports 20 options, which are listed below.
+The JSon Jackson dataformat supports 21 options, which are listed below.
 
 
 
@@ -45,6 +45,7 @@ The JSon Jackson dataformat supports 20 options, which are listed below.
 | allowUnmarshallType | false | Boolean | 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 |  | String | If set then Jackson will use the Timezone when marshalling/unmarshalling. This option will have no effect on the others Json DataFormat, like gson, fastjson and xstream.
 | autoDiscoverObjectMapper | false | Boolean | If set to true then Jackson will lookup for an objectMapper into the registry
+| dropRootNode | false | Boolean | Whether XStream will drop the root node in the generated JSon. You may want to enable this when using POJOs; as then the written object will include the class name as root node, which is often not intended to be written in the JSon output.
 | contentTypeHeader | false | Boolean | Whether the data format should set the Content-Type header with the type from the data format if the data format is capable of doing so. For example application/xml for data formats marshalling to XML, or application/json for data formats marshalling to JSon etc.
 |===
 // dataformat options: END
diff --git a/docs/components/modules/dataformats/pages/json-johnzon-dataformat.adoc b/docs/components/modules/dataformats/pages/json-johnzon-dataformat.adoc
index ea67f07..3d4287e 100644
--- a/docs/components/modules/dataformats/pages/json-johnzon-dataformat.adoc
+++ b/docs/components/modules/dataformats/pages/json-johnzon-dataformat.adoc
@@ -19,7 +19,7 @@ from("activemq:My.Queue").
 
 
 // dataformat options: START
-The JSon Johnzon dataformat supports 20 options, which are listed below.
+The JSon Johnzon dataformat supports 21 options, which are listed below.
 
 
 
@@ -45,6 +45,7 @@ The JSon Johnzon dataformat supports 20 options, which are listed below.
 | allowUnmarshallType | false | Boolean | 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 |  | String | If set then Jackson will use the Timezone when marshalling/unmarshalling. This option will have no effect on the others Json DataFormat, like gson, fastjson and xstream.
 | autoDiscoverObjectMapper | false | Boolean | If set to true then Jackson will lookup for an objectMapper into the registry
+| dropRootNode | false | Boolean | Whether XStream will drop the root node in the generated JSon. You may want to enable this when using POJOs; as then the written object will include the class name as root node, which is often not intended to be written in the JSon output.
 | contentTypeHeader | false | Boolean | Whether the data format should set the Content-Type header with the type from the data format if the data format is capable of doing so. For example application/xml for data formats marshalling to XML, or application/json for data formats marshalling to JSon etc.
 |===
 // dataformat options: END