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 2021/07/02 07:18:22 UTC
[camel] branch main updated: CAMEL-16755: DataFormats to use
unmarshalType instead of unmarshalTypeName
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.git
The following commit(s) were added to refs/heads/main by this push:
new 64a8bc5 CAMEL-16755: DataFormats to use unmarshalType instead of unmarshalTypeName
64a8bc5 is described below
commit 64a8bc5001a6d72ec5b05770eed20b3247ef6adf
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Fri Jul 2 09:17:51 2021 +0200
CAMEL-16755: DataFormats to use unmarshalType instead of unmarshalTypeName
---
.../org/apache/camel/catalog/docs/cbor-dataformat.adoc | 2 +-
.../apache/camel/catalog/docs/jacksonxml-dataformat.adoc | 14 +++++++-------
.../camel/catalog/docs/yaml-snakeyaml-dataformat.adoc | 4 ++--
.../org/apache/camel/dataformat/avro/AvroDataFormat.java | 2 +-
components/camel-cbor/src/main/docs/cbor-dataformat.adoc | 2 +-
.../camel/component/fastjson/FastjsonDataFormat.java | 2 +-
.../org/apache/camel/component/gson/GsonDataFormat.java | 2 +-
.../camel/component/gson/SpringGsonJsonDataFormatTest.xml | 4 ++--
.../src/main/docs/jacksonxml-dataformat.adoc | 14 +++++++-------
.../apache/camel/component/johnzon/JohnzonDataFormat.java | 2 +-
.../component/johnzon/SpringJohnzonJsonDataFormatTest.xml | 2 +-
.../org/apache/camel/component/jsonb/JsonbDataFormat.java | 2 +-
.../component/jsonb/SpringJsonbJsonDataFormatTest.xml | 2 +-
.../camel/dataformat/protobuf/ProtobufDataFormat.java | 2 +-
.../java/org/apache/camel/component/rest/RestProducer.java | 4 ++--
.../src/main/docs/yaml-snakeyaml-dataformat.adoc | 4 ++--
.../xstream/SpringMarshalDomainObjectJSONTest.xml | 4 ++--
.../modules/dataformats/pages/cbor-dataformat.adoc | 2 +-
.../modules/dataformats/pages/jacksonxml-dataformat.adoc | 14 +++++++-------
.../dataformats/pages/yaml-snakeyaml-dataformat.adoc | 4 ++--
docs/user-manual/modules/ROOT/pages/json.adoc | 14 +++++++-------
21 files changed, 51 insertions(+), 51 deletions(-)
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/cbor-dataformat.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/cbor-dataformat.adoc
index e5608d6..044ee18 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/cbor-dataformat.adoc
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/cbor-dataformat.adoc
@@ -56,7 +56,7 @@ tag.
<dataFormats>
<!-- here we define a CBOR data format with the id test and that it should use the TestPojo as the class type when
doing unmarshal. -->
- <cbor id="test" unmarshalTypeName="org.apache.camel.component.cbor.TestPojo"/>
+ <cbor id="test" unmarshalType="org.apache.camel.component.cbor.TestPojo"/>
</dataFormats>
-----------------------------------------------------------------------------------------------------------------------------
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/jacksonxml-dataformat.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/jacksonxml-dataformat.adoc
index 00bde2c..34fe5ab 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/jacksonxml-dataformat.adoc
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/jacksonxml-dataformat.adoc
@@ -78,8 +78,8 @@ tag.
-----------------------------------------------------------------------------------------------------------------------------
<dataFormats>
<!-- here we define a Xml data format with the id jack and that it should use the TestPojo as the class type when
- doing unmarshal. The unmarshalTypeName is optional, if not provided Camel will use a Map as the type -->
- <jacksonxml id="jack" unmarshalTypeName="org.apache.camel.component.jacksonxml.TestPojo"/>
+ doing unmarshal. The unmarshalType is optional, if not provided Camel will use a Map as the type -->
+ <jacksonxml id="jack" unmarshalType="org.apache.camel.component.jacksonxml.TestPojo"/>
</dataFormats>
-----------------------------------------------------------------------------------------------------------------------------
@@ -140,7 +140,7 @@ And the same in XML DSL:
---------------------------------------------------------------------------------------------------------------------------------------------------
<from uri="direct:inPojoAgeView"/>
<marshal>
- <jacksonxml unmarshalTypeName="org.apache.camel.component.jacksonxml.TestPojoView" jsonView="org.apache.camel.component.jacksonxml.Views$Age"/>
+ <jacksonxml unmarshalType="org.apache.camel.component.jacksonxml.TestPojoView" jsonView="org.apache.camel.component.jacksonxml.Views$Age"/>
</marshal>
---------------------------------------------------------------------------------------------------------------------------------------------------
@@ -236,7 +236,7 @@ And you can specify the pojo type also
[source,java]
-------------------------------------------------------------------------------
<dataFormats>
- <jacksonxml id="jack" useList="true" unmarshalTypeName="com.foo.MyPojo"/>
+ <jacksonxml id="jack" useList="true" unmarshalType="com.foo.MyPojo"/>
</dataFormats>
-------------------------------------------------------------------------------
@@ -248,7 +248,7 @@ those using the moduleClassNames option as shown below.
[source,java]
-----------------------------------------------------------------------------------------------------------------------------------------
<dataFormats>
- <jacksonxml id="jack" useList="true" unmarshalTypeName="com.foo.MyPojo" moduleClassNames="com.foo.MyModule,com.foo.MyOtherModule"/>
+ <jacksonxml id="jack" useList="true" unmarshalType="com.foo.MyPojo" moduleClassNames="com.foo.MyModule,com.foo.MyOtherModule"/>
</dataFormats>
-----------------------------------------------------------------------------------------------------------------------------------------
@@ -265,7 +265,7 @@ to the module as shown below:
</bean>
<dataFormats>
- <jacksonxml id="jacksonxml" useList="true" unmarshalTypeName="com.foo.MyPojo" moduleRefs="myJacksonModule"/>
+ <jacksonxml id="jacksonxml" useList="true" unmarshalType="com.foo.MyPojo" moduleRefs="myJacksonModule"/>
</dataFormats>
------------------------------------------------------------------------------------------------------------------
@@ -281,7 +281,7 @@ when marshalling, you can configure this using the disableFeatures:
[source,java]
-------------------------------------------------------------------------------------------------------------------
<dataFormats>
- <jacksonxml id="jacksonxml" unmarshalTypeName="com.foo.MyPojo" disableFeatures="FAIL_ON_UNKNOWN_PROPERTIES"/>
+ <jacksonxml id="jacksonxml" unmarshalType="com.foo.MyPojo" disableFeatures="FAIL_ON_UNKNOWN_PROPERTIES"/>
</dataFormats>
-------------------------------------------------------------------------------------------------------------------
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/yaml-snakeyaml-dataformat.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/yaml-snakeyaml-dataformat.adoc
index 7b52556..7c11ca7 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/yaml-snakeyaml-dataformat.adoc
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/yaml-snakeyaml-dataformat.adoc
@@ -92,13 +92,13 @@ tag.
<dataFormats>
<!--
here we define a YAML data format with the id snake and that it should use
- the TestPojo as the class type when doing unmarshal. The unmarshalTypeName
+ the TestPojo as the class type when doing unmarshal. The unmarshalType
is optional
-->
<yaml
id="snake"
library="SnakeYAML"
- unmarshalTypeName="org.apache.camel.component.yaml.model.TestPojo"/>
+ unmarshalType="org.apache.camel.component.yaml.model.TestPojo"/>
<!--
here we define a YAML data format with the id snake-safe which restricts the
diff --git a/components/camel-avro/src/main/java/org/apache/camel/dataformat/avro/AvroDataFormat.java b/components/camel-avro/src/main/java/org/apache/camel/dataformat/avro/AvroDataFormat.java
index 4ceea69..f089eda 100644
--- a/components/camel-avro/src/main/java/org/apache/camel/dataformat/avro/AvroDataFormat.java
+++ b/components/camel-avro/src/main/java/org/apache/camel/dataformat/avro/AvroDataFormat.java
@@ -47,7 +47,7 @@ import org.apache.camel.util.ObjectHelper;
@Metadata(excludeProperties = "library,objectMapper,useDefaultObjectMapper,jsonViewTypeName,jsonView,include,allowJmsType," +
"collectionTypeName,collectionType,useList,moduleClassNames,moduleRefs,enableFeatures," +
"disableFeatures,allowUnmarshallType,timezone,autoDiscoverObjectMapper," +
- "contentTypeHeader,schemaResolver,autoDiscoverSchemaResolver,unmarshalTypeName")
+ "contentTypeHeader,schemaResolver,autoDiscoverSchemaResolver,unmarshalType,unmarshalTypeName")
public class AvroDataFormat extends ServiceSupport implements DataFormat, DataFormatName, CamelContextAware {
private static final String GENERIC_CONTAINER_CLASSNAME = GenericContainer.class.getName();
diff --git a/components/camel-cbor/src/main/docs/cbor-dataformat.adoc b/components/camel-cbor/src/main/docs/cbor-dataformat.adoc
index e5608d6..044ee18 100644
--- a/components/camel-cbor/src/main/docs/cbor-dataformat.adoc
+++ b/components/camel-cbor/src/main/docs/cbor-dataformat.adoc
@@ -56,7 +56,7 @@ tag.
<dataFormats>
<!-- here we define a CBOR data format with the id test and that it should use the TestPojo as the class type when
doing unmarshal. -->
- <cbor id="test" unmarshalTypeName="org.apache.camel.component.cbor.TestPojo"/>
+ <cbor id="test" unmarshalType="org.apache.camel.component.cbor.TestPojo"/>
</dataFormats>
-----------------------------------------------------------------------------------------------------------------------------
diff --git a/components/camel-fastjson/src/main/java/org/apache/camel/component/fastjson/FastjsonDataFormat.java b/components/camel-fastjson/src/main/java/org/apache/camel/component/fastjson/FastjsonDataFormat.java
index ae56e49..8920617 100644
--- a/components/camel-fastjson/src/main/java/org/apache/camel/component/fastjson/FastjsonDataFormat.java
+++ b/components/camel-fastjson/src/main/java/org/apache/camel/component/fastjson/FastjsonDataFormat.java
@@ -39,7 +39,7 @@ import org.apache.camel.support.service.ServiceSupport;
* Marshal POJOs to JSON and back using <a href="https://github.com/alibaba/fastjson">Fastjson</a>
*/
@Dataformat("json-fastjson")
-@Metadata(includeProperties = "unmarshalTypeName,prettyprint,contentTypeHeader")
+@Metadata(includeProperties = "unmarshalType,unmarshalTypeName,prettyprint,contentTypeHeader")
public class FastjsonDataFormat extends ServiceSupport
implements DataFormat, DataFormatName, DataFormatContentTypeHeader, CamelContextAware {
diff --git a/components/camel-gson/src/main/java/org/apache/camel/component/gson/GsonDataFormat.java b/components/camel-gson/src/main/java/org/apache/camel/component/gson/GsonDataFormat.java
index 87e21b4..b031ade 100644
--- a/components/camel-gson/src/main/java/org/apache/camel/component/gson/GsonDataFormat.java
+++ b/components/camel-gson/src/main/java/org/apache/camel/component/gson/GsonDataFormat.java
@@ -48,7 +48,7 @@ import org.apache.camel.util.IOHelper;
* Marshal POJOs to JSON and back using <a href="http://code.google.com/p/google-gson/">Gson</a>
*/
@Dataformat("json-gson")
-@Metadata(includeProperties = "unmarshalTypeName,prettyPrint,contentTypeHeader")
+@Metadata(includeProperties = "unmarshalType,unmarshalTypeName,prettyPrint,contentTypeHeader")
public class GsonDataFormat extends ServiceSupport
implements DataFormat, DataFormatName, DataFormatContentTypeHeader, CamelContextAware {
diff --git a/components/camel-gson/src/test/resources/org/apache/camel/component/gson/SpringGsonJsonDataFormatTest.xml b/components/camel-gson/src/test/resources/org/apache/camel/component/gson/SpringGsonJsonDataFormatTest.xml
index 2b1e504..cd0cebe 100644
--- a/components/camel-gson/src/test/resources/org/apache/camel/component/gson/SpringGsonJsonDataFormatTest.xml
+++ b/components/camel-gson/src/test/resources/org/apache/camel/component/gson/SpringGsonJsonDataFormatTest.xml
@@ -30,8 +30,8 @@
<!-- we define the json jackson data formats to be used -->
<dataFormats>
<!-- this one uses our own TestPojo class as unmarshal type -->
- <json id="gson" library="Gson" unmarshalTypeName="org.apache.camel.component.gson.TestPojo"/>
- <json id="pretty" library="Gson" prettyPrint="true" unmarshalTypeName="org.apache.camel.component.gson.TestPojo"/>
+ <json id="gson" library="Gson" unmarshalType="org.apache.camel.component.gson.TestPojo"/>
+ <json id="pretty" library="Gson" prettyPrint="true" unmarshalType="org.apache.camel.component.gson.TestPojo"/>
</dataFormats>
<route>
diff --git a/components/camel-jacksonxml/src/main/docs/jacksonxml-dataformat.adoc b/components/camel-jacksonxml/src/main/docs/jacksonxml-dataformat.adoc
index 00bde2c..34fe5ab 100644
--- a/components/camel-jacksonxml/src/main/docs/jacksonxml-dataformat.adoc
+++ b/components/camel-jacksonxml/src/main/docs/jacksonxml-dataformat.adoc
@@ -78,8 +78,8 @@ tag.
-----------------------------------------------------------------------------------------------------------------------------
<dataFormats>
<!-- here we define a Xml data format with the id jack and that it should use the TestPojo as the class type when
- doing unmarshal. The unmarshalTypeName is optional, if not provided Camel will use a Map as the type -->
- <jacksonxml id="jack" unmarshalTypeName="org.apache.camel.component.jacksonxml.TestPojo"/>
+ doing unmarshal. The unmarshalType is optional, if not provided Camel will use a Map as the type -->
+ <jacksonxml id="jack" unmarshalType="org.apache.camel.component.jacksonxml.TestPojo"/>
</dataFormats>
-----------------------------------------------------------------------------------------------------------------------------
@@ -140,7 +140,7 @@ And the same in XML DSL:
---------------------------------------------------------------------------------------------------------------------------------------------------
<from uri="direct:inPojoAgeView"/>
<marshal>
- <jacksonxml unmarshalTypeName="org.apache.camel.component.jacksonxml.TestPojoView" jsonView="org.apache.camel.component.jacksonxml.Views$Age"/>
+ <jacksonxml unmarshalType="org.apache.camel.component.jacksonxml.TestPojoView" jsonView="org.apache.camel.component.jacksonxml.Views$Age"/>
</marshal>
---------------------------------------------------------------------------------------------------------------------------------------------------
@@ -236,7 +236,7 @@ And you can specify the pojo type also
[source,java]
-------------------------------------------------------------------------------
<dataFormats>
- <jacksonxml id="jack" useList="true" unmarshalTypeName="com.foo.MyPojo"/>
+ <jacksonxml id="jack" useList="true" unmarshalType="com.foo.MyPojo"/>
</dataFormats>
-------------------------------------------------------------------------------
@@ -248,7 +248,7 @@ those using the moduleClassNames option as shown below.
[source,java]
-----------------------------------------------------------------------------------------------------------------------------------------
<dataFormats>
- <jacksonxml id="jack" useList="true" unmarshalTypeName="com.foo.MyPojo" moduleClassNames="com.foo.MyModule,com.foo.MyOtherModule"/>
+ <jacksonxml id="jack" useList="true" unmarshalType="com.foo.MyPojo" moduleClassNames="com.foo.MyModule,com.foo.MyOtherModule"/>
</dataFormats>
-----------------------------------------------------------------------------------------------------------------------------------------
@@ -265,7 +265,7 @@ to the module as shown below:
</bean>
<dataFormats>
- <jacksonxml id="jacksonxml" useList="true" unmarshalTypeName="com.foo.MyPojo" moduleRefs="myJacksonModule"/>
+ <jacksonxml id="jacksonxml" useList="true" unmarshalType="com.foo.MyPojo" moduleRefs="myJacksonModule"/>
</dataFormats>
------------------------------------------------------------------------------------------------------------------
@@ -281,7 +281,7 @@ when marshalling, you can configure this using the disableFeatures:
[source,java]
-------------------------------------------------------------------------------------------------------------------
<dataFormats>
- <jacksonxml id="jacksonxml" unmarshalTypeName="com.foo.MyPojo" disableFeatures="FAIL_ON_UNKNOWN_PROPERTIES"/>
+ <jacksonxml id="jacksonxml" unmarshalType="com.foo.MyPojo" disableFeatures="FAIL_ON_UNKNOWN_PROPERTIES"/>
</dataFormats>
-------------------------------------------------------------------------------------------------------------------
diff --git a/components/camel-johnzon/src/main/java/org/apache/camel/component/johnzon/JohnzonDataFormat.java b/components/camel-johnzon/src/main/java/org/apache/camel/component/johnzon/JohnzonDataFormat.java
index 1b159b9..a08207e 100644
--- a/components/camel-johnzon/src/main/java/org/apache/camel/component/johnzon/JohnzonDataFormat.java
+++ b/components/camel-johnzon/src/main/java/org/apache/camel/component/johnzon/JohnzonDataFormat.java
@@ -37,7 +37,7 @@ import org.apache.johnzon.mapper.reflection.JohnzonParameterizedType;
* Marshal POJOs to JSON and back using <a href="http://johnzon.apache.org/">Johnzon</a>
*/
@Dataformat("json-johnzon")
-@Metadata(includeProperties = "unmarshalTypeName,objectMapper,prettyPrint")
+@Metadata(includeProperties = "unmarshalType,unmarshalTypeName,objectMapper,prettyPrint")
public class JohnzonDataFormat extends ServiceSupport implements DataFormat, DataFormatName, CamelContextAware {
private CamelContext camelContext;
diff --git a/components/camel-johnzon/src/test/resources/org/apache/camel/component/johnzon/SpringJohnzonJsonDataFormatTest.xml b/components/camel-johnzon/src/test/resources/org/apache/camel/component/johnzon/SpringJohnzonJsonDataFormatTest.xml
index ca5b711..b531d62 100644
--- a/components/camel-johnzon/src/test/resources/org/apache/camel/component/johnzon/SpringJohnzonJsonDataFormatTest.xml
+++ b/components/camel-johnzon/src/test/resources/org/apache/camel/component/johnzon/SpringJohnzonJsonDataFormatTest.xml
@@ -32,7 +32,7 @@
<!-- this uses the default unmarshal type that is a Map based -->
<json id="johnzon" library="Johnzon"/>
<!-- and this one uses our own TestPojo class as unmarshal type -->
- <json id="pojo" library="Johnzon" unmarshalTypeName="org.apache.camel.component.johnzon.TestPojo"/>
+ <json id="pojo" library="Johnzon" unmarshalType="org.apache.camel.component.johnzon.TestPojo"/>
</dataFormats>
<route>
diff --git a/components/camel-jsonb/src/main/java/org/apache/camel/component/jsonb/JsonbDataFormat.java b/components/camel-jsonb/src/main/java/org/apache/camel/component/jsonb/JsonbDataFormat.java
index ea88a49..ac5ad04 100644
--- a/components/camel-jsonb/src/main/java/org/apache/camel/component/jsonb/JsonbDataFormat.java
+++ b/components/camel-jsonb/src/main/java/org/apache/camel/component/jsonb/JsonbDataFormat.java
@@ -40,7 +40,7 @@ import org.apache.camel.support.service.ServiceSupport;
* Marshal POJOs to JSON and back using JSON-B.
*/
@Dataformat("json-jsonb")
-@Metadata(includeProperties = "unmarshalTypeName,objectMapper,prettyPrint,binaryStrategy,encoding,propertyOrder,propertyamingStrategy,skipNull")
+@Metadata(includeProperties = "unmarshalTypeName,unmarshalType,objectMapper,prettyPrint,binaryStrategy,encoding,propertyOrder,propertyamingStrategy,skipNull")
public class JsonbDataFormat extends ServiceSupport implements DataFormat, DataFormatName, CamelContextAware {
private CamelContext camelContext;
private Jsonb objectMapper;
diff --git a/components/camel-jsonb/src/test/resources/org/apache/camel/component/jsonb/SpringJsonbJsonDataFormatTest.xml b/components/camel-jsonb/src/test/resources/org/apache/camel/component/jsonb/SpringJsonbJsonDataFormatTest.xml
index 50f1e7f..e6b28ff 100644
--- a/components/camel-jsonb/src/test/resources/org/apache/camel/component/jsonb/SpringJsonbJsonDataFormatTest.xml
+++ b/components/camel-jsonb/src/test/resources/org/apache/camel/component/jsonb/SpringJsonbJsonDataFormatTest.xml
@@ -32,7 +32,7 @@
<!-- this uses the default unmarshal type that is a Map based -->
<json id="jsonb" library="Jsonb"/>
<!-- and this one uses our own TestPojo class as unmarshal type -->
- <json id="pojo" library="Jsonb" unmarshalTypeName="org.apache.camel.component.jsonb.TestPojo"/>
+ <json id="pojo" library="Jsonb" unmarshalType="org.apache.camel.component.jsonb.TestPojo"/>
</dataFormats>
<route>
diff --git a/components/camel-protobuf/src/main/java/org/apache/camel/dataformat/protobuf/ProtobufDataFormat.java b/components/camel-protobuf/src/main/java/org/apache/camel/dataformat/protobuf/ProtobufDataFormat.java
index fea2d24..3c3ccf6 100644
--- a/components/camel-protobuf/src/main/java/org/apache/camel/dataformat/protobuf/ProtobufDataFormat.java
+++ b/components/camel-protobuf/src/main/java/org/apache/camel/dataformat/protobuf/ProtobufDataFormat.java
@@ -45,7 +45,7 @@ import org.apache.commons.io.IOUtils;
@Metadata(excludeProperties = "library,objectMapper,useDefaultObjectMapper,jsonViewTypeName,jsonView,include,allowJmsType," +
"collectionTypeName,collectionType,useList,moduleClassNames,moduleRefs,enableFeatures," +
"disableFeatures,allowUnmarshallType,timezone,autoDiscoverObjectMapper," +
- "schemaResolver,autoDiscoverSchemaResolver,unmarshalTypeName")
+ "schemaResolver,autoDiscoverSchemaResolver,unmarshalType,unmarshalTypeName")
public class ProtobufDataFormat extends ServiceSupport
implements DataFormat, DataFormatName, DataFormatContentTypeHeader, CamelContextAware {
diff --git a/components/camel-rest/src/main/java/org/apache/camel/component/rest/RestProducer.java b/components/camel-rest/src/main/java/org/apache/camel/component/rest/RestProducer.java
index f25c18b..cb0fcb1 100644
--- a/components/camel-rest/src/main/java/org/apache/camel/component/rest/RestProducer.java
+++ b/components/camel-rest/src/main/java/org/apache/camel/component/rest/RestProducer.java
@@ -318,7 +318,7 @@ public class RestProducer extends DefaultAsyncProducer {
.withTarget(json);
if (type != null) {
String typeName = type.endsWith("[]") ? type.substring(0, type.length() - 2) : type;
- builder.withProperty("unmarshalTypeName", typeName);
+ builder.withProperty("unmarshalType", typeName);
builder.withProperty("useList", type.endsWith("[]"));
}
setAdditionalConfiguration(configuration, "json.in.", builder);
@@ -330,7 +330,7 @@ public class RestProducer extends DefaultAsyncProducer {
.withTarget(outJson);
if (outType != null) {
String typeName = outType.endsWith("[]") ? outType.substring(0, outType.length() - 2) : outType;
- builder.withProperty("unmarshalTypeName", typeName);
+ builder.withProperty("unmarshalType", typeName);
builder.withProperty("useList", outType.endsWith("[]"));
}
setAdditionalConfiguration(configuration, "json.out.", builder);
diff --git a/components/camel-snakeyaml/src/main/docs/yaml-snakeyaml-dataformat.adoc b/components/camel-snakeyaml/src/main/docs/yaml-snakeyaml-dataformat.adoc
index 7b52556..7c11ca7 100644
--- a/components/camel-snakeyaml/src/main/docs/yaml-snakeyaml-dataformat.adoc
+++ b/components/camel-snakeyaml/src/main/docs/yaml-snakeyaml-dataformat.adoc
@@ -92,13 +92,13 @@ tag.
<dataFormats>
<!--
here we define a YAML data format with the id snake and that it should use
- the TestPojo as the class type when doing unmarshal. The unmarshalTypeName
+ the TestPojo as the class type when doing unmarshal. The unmarshalType
is optional
-->
<yaml
id="snake"
library="SnakeYAML"
- unmarshalTypeName="org.apache.camel.component.yaml.model.TestPojo"/>
+ unmarshalType="org.apache.camel.component.yaml.model.TestPojo"/>
<!--
here we define a YAML data format with the id snake-safe which restricts the
diff --git a/components/camel-xstream/src/test/resources/org/apache/camel/dataformat/xstream/SpringMarshalDomainObjectJSONTest.xml b/components/camel-xstream/src/test/resources/org/apache/camel/dataformat/xstream/SpringMarshalDomainObjectJSONTest.xml
index 5be5077..b1d4876 100644
--- a/components/camel-xstream/src/test/resources/org/apache/camel/dataformat/xstream/SpringMarshalDomainObjectJSONTest.xml
+++ b/components/camel-xstream/src/test/resources/org/apache/camel/dataformat/xstream/SpringMarshalDomainObjectJSONTest.xml
@@ -29,8 +29,8 @@
<!-- we define the json xstream data formats to be used -->
<dataFormats>
- <json id="json" library="XStream" unmarshalTypeName="org.apache.camel.dataformat.xstream.PurchaseOrder"/>
- <json id="pretty" library="XStream" prettyPrint="true" unmarshalTypeName="org.apache.camel.dataformat.xstream.PurchaseOrder"/>
+ <json id="json" library="XStream" unmarshalType="org.apache.camel.dataformat.xstream.PurchaseOrder"/>
+ <json id="pretty" library="XStream" prettyPrint="true" unmarshalType="org.apache.camel.dataformat.xstream.PurchaseOrder"/>
</dataFormats>
<route>
diff --git a/docs/components/modules/dataformats/pages/cbor-dataformat.adoc b/docs/components/modules/dataformats/pages/cbor-dataformat.adoc
index 995a48e..8c6c696 100644
--- a/docs/components/modules/dataformats/pages/cbor-dataformat.adoc
+++ b/docs/components/modules/dataformats/pages/cbor-dataformat.adoc
@@ -58,7 +58,7 @@ tag.
<dataFormats>
<!-- here we define a CBOR data format with the id test and that it should use the TestPojo as the class type when
doing unmarshal. -->
- <cbor id="test" unmarshalTypeName="org.apache.camel.component.cbor.TestPojo"/>
+ <cbor id="test" unmarshalType="org.apache.camel.component.cbor.TestPojo"/>
</dataFormats>
-----------------------------------------------------------------------------------------------------------------------------
diff --git a/docs/components/modules/dataformats/pages/jacksonxml-dataformat.adoc b/docs/components/modules/dataformats/pages/jacksonxml-dataformat.adoc
index 9f87f23..b9cfca8 100644
--- a/docs/components/modules/dataformats/pages/jacksonxml-dataformat.adoc
+++ b/docs/components/modules/dataformats/pages/jacksonxml-dataformat.adoc
@@ -80,8 +80,8 @@ tag.
-----------------------------------------------------------------------------------------------------------------------------
<dataFormats>
<!-- here we define a Xml data format with the id jack and that it should use the TestPojo as the class type when
- doing unmarshal. The unmarshalTypeName is optional, if not provided Camel will use a Map as the type -->
- <jacksonxml id="jack" unmarshalTypeName="org.apache.camel.component.jacksonxml.TestPojo"/>
+ doing unmarshal. The unmarshalType is optional, if not provided Camel will use a Map as the type -->
+ <jacksonxml id="jack" unmarshalType="org.apache.camel.component.jacksonxml.TestPojo"/>
</dataFormats>
-----------------------------------------------------------------------------------------------------------------------------
@@ -142,7 +142,7 @@ And the same in XML DSL:
---------------------------------------------------------------------------------------------------------------------------------------------------
<from uri="direct:inPojoAgeView"/>
<marshal>
- <jacksonxml unmarshalTypeName="org.apache.camel.component.jacksonxml.TestPojoView" jsonView="org.apache.camel.component.jacksonxml.Views$Age"/>
+ <jacksonxml unmarshalType="org.apache.camel.component.jacksonxml.TestPojoView" jsonView="org.apache.camel.component.jacksonxml.Views$Age"/>
</marshal>
---------------------------------------------------------------------------------------------------------------------------------------------------
@@ -238,7 +238,7 @@ And you can specify the pojo type also
[source,java]
-------------------------------------------------------------------------------
<dataFormats>
- <jacksonxml id="jack" useList="true" unmarshalTypeName="com.foo.MyPojo"/>
+ <jacksonxml id="jack" useList="true" unmarshalType="com.foo.MyPojo"/>
</dataFormats>
-------------------------------------------------------------------------------
@@ -250,7 +250,7 @@ those using the moduleClassNames option as shown below.
[source,java]
-----------------------------------------------------------------------------------------------------------------------------------------
<dataFormats>
- <jacksonxml id="jack" useList="true" unmarshalTypeName="com.foo.MyPojo" moduleClassNames="com.foo.MyModule,com.foo.MyOtherModule"/>
+ <jacksonxml id="jack" useList="true" unmarshalType="com.foo.MyPojo" moduleClassNames="com.foo.MyModule,com.foo.MyOtherModule"/>
</dataFormats>
-----------------------------------------------------------------------------------------------------------------------------------------
@@ -267,7 +267,7 @@ to the module as shown below:
</bean>
<dataFormats>
- <jacksonxml id="jacksonxml" useList="true" unmarshalTypeName="com.foo.MyPojo" moduleRefs="myJacksonModule"/>
+ <jacksonxml id="jacksonxml" useList="true" unmarshalType="com.foo.MyPojo" moduleRefs="myJacksonModule"/>
</dataFormats>
------------------------------------------------------------------------------------------------------------------
@@ -283,7 +283,7 @@ when marshalling, you can configure this using the disableFeatures:
[source,java]
-------------------------------------------------------------------------------------------------------------------
<dataFormats>
- <jacksonxml id="jacksonxml" unmarshalTypeName="com.foo.MyPojo" disableFeatures="FAIL_ON_UNKNOWN_PROPERTIES"/>
+ <jacksonxml id="jacksonxml" unmarshalType="com.foo.MyPojo" disableFeatures="FAIL_ON_UNKNOWN_PROPERTIES"/>
</dataFormats>
-------------------------------------------------------------------------------------------------------------------
diff --git a/docs/components/modules/dataformats/pages/yaml-snakeyaml-dataformat.adoc b/docs/components/modules/dataformats/pages/yaml-snakeyaml-dataformat.adoc
index 399323a..73e3cdc 100644
--- a/docs/components/modules/dataformats/pages/yaml-snakeyaml-dataformat.adoc
+++ b/docs/components/modules/dataformats/pages/yaml-snakeyaml-dataformat.adoc
@@ -94,13 +94,13 @@ tag.
<dataFormats>
<!--
here we define a YAML data format with the id snake and that it should use
- the TestPojo as the class type when doing unmarshal. The unmarshalTypeName
+ the TestPojo as the class type when doing unmarshal. The unmarshalType
is optional
-->
<yaml
id="snake"
library="SnakeYAML"
- unmarshalTypeName="org.apache.camel.component.yaml.model.TestPojo"/>
+ unmarshalType="org.apache.camel.component.yaml.model.TestPojo"/>
<!--
here we define a YAML data format with the id snake-safe which restricts the
diff --git a/docs/user-manual/modules/ROOT/pages/json.adoc b/docs/user-manual/modules/ROOT/pages/json.adoc
index 78d73c5..1a2ca4e 100644
--- a/docs/user-manual/modules/ROOT/pages/json.adoc
+++ b/docs/user-manual/modules/ROOT/pages/json.adoc
@@ -72,8 +72,8 @@ tag.
------------------------------------------------------------------------------------------------------------------------------
<dataFormats>
<!-- here we define a Json data format with the id jack and that it should use the TestPojo as the class type when
- doing unmarshal. The unmarshalTypeName is optional, if not provided Camel will use a Map as the type -->
- <json id="jack" library="Jackson" unmarshalTypeName="org.apache.camel.component.jackson.TestPojo"/>
+ doing unmarshal. The unmarshalType is optional, if not provided Camel will use a Map as the type -->
+ <json id="jack" library="Jackson" unmarshalType="org.apache.camel.component.jackson.TestPojo"/>
</dataFormats>
------------------------------------------------------------------------------------------------------------------------------
@@ -248,7 +248,7 @@ And the same in XML DSL:
---------------------------------------------------------------------------------------------------------------------------------------------------------
<from uri="direct:inPojoAgeView"/>
<marshal>
- <json library="Jackson" unmarshalTypeName="org.apache.camel.component.jackson.TestPojoView" jsonView="org.apache.camel.component.jackson.Views$Age"/>
+ <json library="Jackson" unmarshalType="org.apache.camel.component.jackson.TestPojoView" jsonView="org.apache.camel.component.jackson.Views$Age"/>
</marshal>
---------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -354,7 +354,7 @@ And you can specify the pojo type also
[source,java]
-------------------------------------------------------------------------------------------
<dataFormats>
- <json id="json" library="Jackson" useList="true" unmarshalTypeName="com.foo.MyPojo"/>
+ <json id="json" library="Jackson" useList="true" unmarshalType="com.foo.MyPojo"/>
</dataFormats>
-------------------------------------------------------------------------------------------
@@ -387,7 +387,7 @@ those using the moduleClassNames option as shown below.
[source,java]
-----------------------------------------------------------------------------------------------------------------------------------------------------
<dataFormats>
- <json id="json" library="Jackson" useList="true" unmarshalTypeName="com.foo.MyPojo" moduleClassNames="com.foo.MyModule,com.foo.MyOtherModule"/>
+ <json id="json" library="Jackson" useList="true" unmarshalType="com.foo.MyPojo" moduleClassNames="com.foo.MyModule,com.foo.MyOtherModule"/>
</dataFormats>
-----------------------------------------------------------------------------------------------------------------------------------------------------
@@ -404,7 +404,7 @@ to the module as shown below:
</bean>
<dataFormats>
- <json id="json" library="Jackson" useList="true" unmarshalTypeName="com.foo.MyPojo" moduleRefs="myJacksonModule"/>
+ <json id="json" library="Jackson" useList="true" unmarshalType="com.foo.MyPojo" moduleRefs="myJacksonModule"/>
</dataFormats>
------------------------------------------------------------------------------------------------------------------------
@@ -423,7 +423,7 @@ when marshalling, you can configure this using the disableFeatures:
[source,java]
-------------------------------------------------------------------------------------------------------------------------
<dataFormats>
- <json id="json" library="Jackson" unmarshalTypeName="com.foo.MyPojo" disableFeatures="FAIL_ON_UNKNOWN_PROPERTIES"/>
+ <json id="json" library="Jackson" unmarshalType="com.foo.MyPojo" disableFeatures="FAIL_ON_UNKNOWN_PROPERTIES"/>
</dataFormats>
-------------------------------------------------------------------------------------------------------------------------