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 <claus.ib...@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