You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2016/12/08 09:30:23 UTC

[1/3] camel git commit: CAMEL-10567: Camel-Jackson: Add an option to allow the UnmarshallType header use

Repository: camel
Updated Branches:
  refs/heads/master 3c0b7d036 -> af3f54de3


CAMEL-10567: Camel-Jackson: Add an option to allow the UnmarshallType header use


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/2b0e9611
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/2b0e9611
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/2b0e9611

Branch: refs/heads/master
Commit: 2b0e96117d6f01eba0c18e2ff8df6a438e819721
Parents: 3c0b7d0
Author: Andrea Cosentino <an...@gmail.com>
Authored: Thu Dec 8 09:51:19 2016 +0100
Committer: Andrea Cosentino <an...@gmail.com>
Committed: Thu Dec 8 09:51:19 2016 +0100

----------------------------------------------------------------------
 .../camel/component/jackson/JacksonDataFormat.java      | 12 ++++++------
 .../jackson/JacksonMarshalUnmarshalTypeHeaderTest.java  |  2 +-
 2 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/2b0e9611/components/camel-jackson/src/main/java/org/apache/camel/component/jackson/JacksonDataFormat.java
----------------------------------------------------------------------
diff --git a/components/camel-jackson/src/main/java/org/apache/camel/component/jackson/JacksonDataFormat.java b/components/camel-jackson/src/main/java/org/apache/camel/component/jackson/JacksonDataFormat.java
index 4772619..ec7073f 100644
--- a/components/camel-jackson/src/main/java/org/apache/camel/component/jackson/JacksonDataFormat.java
+++ b/components/camel-jackson/src/main/java/org/apache/camel/component/jackson/JacksonDataFormat.java
@@ -68,7 +68,7 @@ public class JacksonDataFormat extends ServiceSupport implements DataFormat, Dat
     private String enableFeatures;
     private String disableFeatures;
     private boolean enableJacksonTypeConverter;
-    private boolean allowJacksonUnmarshallType;
+    private boolean allowUnmarshallType;
 
     /**
      * Use the default Jackson {@link ObjectMapper} and {@link Object}
@@ -160,7 +160,7 @@ public class JacksonDataFormat extends ServiceSupport implements DataFormat, Dat
         // is there a header with the unmarshal type?
         Class<?> clazz = unmarshalType;
         String type = null;
-        if (allowJacksonUnmarshallType) {
+        if (allowUnmarshallType) {
             type = exchange.getIn().getHeader(JacksonConstants.UNMARSHAL_TYPE, String.class);
         }
         if (type == null && isAllowJmsType()) {
@@ -331,8 +331,8 @@ public class JacksonDataFormat extends ServiceSupport implements DataFormat, Dat
         this.enableJacksonTypeConverter = enableJacksonTypeConverter;
     }
     
-    public boolean isAllowJacksonUnmarshallType() {
-        return allowJacksonUnmarshallType;
+    public boolean isAllowUnmarshallType() {
+        return allowUnmarshallType;
     }
 
     /**
@@ -340,8 +340,8 @@ public class JacksonDataFormat extends ServiceSupport implements DataFormat, Dat
      * <p/>
      * This should only be enabled when desired to be used.
      */
-    public void setAllowJacksonUnmarshallType(boolean allowJacksonUnmarshallType) {
-        this.allowJacksonUnmarshallType = allowJacksonUnmarshallType;
+    public void setAllowUnmarshallType(boolean allowJacksonUnmarshallType) {
+        this.allowUnmarshallType = allowJacksonUnmarshallType;
     }
 
     public String getEnableFeatures() {

http://git-wip-us.apache.org/repos/asf/camel/blob/2b0e9611/components/camel-jackson/src/test/java/org/apache/camel/component/jackson/JacksonMarshalUnmarshalTypeHeaderTest.java
----------------------------------------------------------------------
diff --git a/components/camel-jackson/src/test/java/org/apache/camel/component/jackson/JacksonMarshalUnmarshalTypeHeaderTest.java b/components/camel-jackson/src/test/java/org/apache/camel/component/jackson/JacksonMarshalUnmarshalTypeHeaderTest.java
index 623b32e..775e7ea 100644
--- a/components/camel-jackson/src/test/java/org/apache/camel/component/jackson/JacksonMarshalUnmarshalTypeHeaderTest.java
+++ b/components/camel-jackson/src/test/java/org/apache/camel/component/jackson/JacksonMarshalUnmarshalTypeHeaderTest.java
@@ -46,7 +46,7 @@ public class JacksonMarshalUnmarshalTypeHeaderTest extends CamelTestSupport {
             @Override
             public void configure() throws Exception {
                 JacksonDataFormat format = new JacksonDataFormat();
-                format.setAllowJacksonUnmarshallType(true);
+                format.setAllowUnmarshallType(true);
 
                 from("direct:backPojo").unmarshal(format).to("mock:reversePojo");
 


[3/3] camel git commit: CAMEL-10567: Camel-Jackson: Add an option to allow the UnmarshallType header use. Regenerated code

Posted by ac...@apache.org.
CAMEL-10567: Camel-Jackson: Add an option to allow the UnmarshallType header use. Regenerated code


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/af3f54de
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/af3f54de
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/af3f54de

Branch: refs/heads/master
Commit: af3f54de35a90a5a49a4af4622e8bd1011bf5ecc
Parents: 02270ab
Author: Andrea Cosentino <an...@gmail.com>
Authored: Thu Dec 8 10:23:30 2016 +0100
Committer: Andrea Cosentino <an...@gmail.com>
Committed: Thu Dec 8 10:29:18 2016 +0100

----------------------------------------------------------------------
 .../gson/springboot/GsonDataFormatConfiguration.java  | 14 ++++++++++++++
 .../springboot/JacksonDataFormatConfiguration.java    | 14 ++++++++++++++
 .../springboot/JohnzonDataFormatConfiguration.java    | 14 ++++++++++++++
 .../springboot/JsonDataFormatConfiguration.java       | 14 ++++++++++++++
 .../src/main/docs/json-gson-dataformat.adoc           |  3 ++-
 .../src/main/docs/json-jackson-dataformat.adoc        |  3 ++-
 .../src/main/docs/json-johnzon-dataformat.adoc        |  3 ++-
 .../src/main/docs/json-xstream-dataformat.adoc        |  3 ++-
 8 files changed, 64 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/af3f54de/components-starter/camel-gson-starter/src/main/java/org/apache/camel/component/gson/springboot/GsonDataFormatConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-gson-starter/src/main/java/org/apache/camel/component/gson/springboot/GsonDataFormatConfiguration.java b/components-starter/camel-gson-starter/src/main/java/org/apache/camel/component/gson/springboot/GsonDataFormatConfiguration.java
index c4324a6..4e89e3f 100644
--- a/components-starter/camel-gson-starter/src/main/java/org/apache/camel/component/gson/springboot/GsonDataFormatConfiguration.java
+++ b/components-starter/camel-gson-starter/src/main/java/org/apache/camel/component/gson/springboot/GsonDataFormatConfiguration.java
@@ -122,6 +122,12 @@ public class GsonDataFormatConfiguration {
      * org.apache.camel.xstream.permissions.
      */
     private String permissions;
+    /**
+     * 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.
+     */
+    private Boolean allowUnmarshallType = false;
 
     public String getObjectMapper() {
         return objectMapper;
@@ -242,4 +248,12 @@ public class GsonDataFormatConfiguration {
     public void setPermissions(String permissions) {
         this.permissions = permissions;
     }
+
+    public Boolean getAllowUnmarshallType() {
+        return allowUnmarshallType;
+    }
+
+    public void setAllowUnmarshallType(Boolean allowUnmarshallType) {
+        this.allowUnmarshallType = allowUnmarshallType;
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/af3f54de/components-starter/camel-jackson-starter/src/main/java/org/apache/camel/component/jackson/springboot/JacksonDataFormatConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-jackson-starter/src/main/java/org/apache/camel/component/jackson/springboot/JacksonDataFormatConfiguration.java b/components-starter/camel-jackson-starter/src/main/java/org/apache/camel/component/jackson/springboot/JacksonDataFormatConfiguration.java
index 57d06c4..e00a318 100644
--- a/components-starter/camel-jackson-starter/src/main/java/org/apache/camel/component/jackson/springboot/JacksonDataFormatConfiguration.java
+++ b/components-starter/camel-jackson-starter/src/main/java/org/apache/camel/component/jackson/springboot/JacksonDataFormatConfiguration.java
@@ -122,6 +122,12 @@ public class JacksonDataFormatConfiguration {
      * org.apache.camel.xstream.permissions.
      */
     private String permissions;
+    /**
+     * 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.
+     */
+    private Boolean allowUnmarshallType = false;
 
     public String getObjectMapper() {
         return objectMapper;
@@ -242,4 +248,12 @@ public class JacksonDataFormatConfiguration {
     public void setPermissions(String permissions) {
         this.permissions = permissions;
     }
+
+    public Boolean getAllowUnmarshallType() {
+        return allowUnmarshallType;
+    }
+
+    public void setAllowUnmarshallType(Boolean allowUnmarshallType) {
+        this.allowUnmarshallType = allowUnmarshallType;
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/af3f54de/components-starter/camel-johnzon-starter/src/main/java/org/apache/camel/component/johnzon/springboot/JohnzonDataFormatConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-johnzon-starter/src/main/java/org/apache/camel/component/johnzon/springboot/JohnzonDataFormatConfiguration.java b/components-starter/camel-johnzon-starter/src/main/java/org/apache/camel/component/johnzon/springboot/JohnzonDataFormatConfiguration.java
index e3719c9..d6c73df 100644
--- a/components-starter/camel-johnzon-starter/src/main/java/org/apache/camel/component/johnzon/springboot/JohnzonDataFormatConfiguration.java
+++ b/components-starter/camel-johnzon-starter/src/main/java/org/apache/camel/component/johnzon/springboot/JohnzonDataFormatConfiguration.java
@@ -122,6 +122,12 @@ public class JohnzonDataFormatConfiguration {
      * org.apache.camel.xstream.permissions.
      */
     private String permissions;
+    /**
+     * 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.
+     */
+    private Boolean allowUnmarshallType = false;
 
     public String getObjectMapper() {
         return objectMapper;
@@ -242,4 +248,12 @@ public class JohnzonDataFormatConfiguration {
     public void setPermissions(String permissions) {
         this.permissions = permissions;
     }
+
+    public Boolean getAllowUnmarshallType() {
+        return allowUnmarshallType;
+    }
+
+    public void setAllowUnmarshallType(Boolean allowUnmarshallType) {
+        this.allowUnmarshallType = allowUnmarshallType;
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/af3f54de/components-starter/camel-xstream-starter/src/main/java/org/apache/camel/dataformat/xstream/springboot/JsonDataFormatConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-xstream-starter/src/main/java/org/apache/camel/dataformat/xstream/springboot/JsonDataFormatConfiguration.java b/components-starter/camel-xstream-starter/src/main/java/org/apache/camel/dataformat/xstream/springboot/JsonDataFormatConfiguration.java
index 153dbc5..5711cd8 100644
--- a/components-starter/camel-xstream-starter/src/main/java/org/apache/camel/dataformat/xstream/springboot/JsonDataFormatConfiguration.java
+++ b/components-starter/camel-xstream-starter/src/main/java/org/apache/camel/dataformat/xstream/springboot/JsonDataFormatConfiguration.java
@@ -122,6 +122,12 @@ public class JsonDataFormatConfiguration {
      * org.apache.camel.xstream.permissions.
      */
     private String permissions;
+    /**
+     * 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.
+     */
+    private Boolean allowUnmarshallType = false;
 
     public String getObjectMapper() {
         return objectMapper;
@@ -242,4 +248,12 @@ public class JsonDataFormatConfiguration {
     public void setPermissions(String permissions) {
         this.permissions = permissions;
     }
+
+    public Boolean getAllowUnmarshallType() {
+        return allowUnmarshallType;
+    }
+
+    public void setAllowUnmarshallType(Boolean allowUnmarshallType) {
+        this.allowUnmarshallType = allowUnmarshallType;
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/af3f54de/components/camel-gson/src/main/docs/json-gson-dataformat.adoc
----------------------------------------------------------------------
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 8331364..cb83a73 100644
--- a/components/camel-gson/src/main/docs/json-gson-dataformat.adoc
+++ b/components/camel-gson/src/main/docs/json-gson-dataformat.adoc
@@ -20,7 +20,7 @@ Gson Options
 
 
 // dataformat options: START
-The JSon GSon dataformat supports 15 options which are listed below.
+The JSon GSon dataformat supports 16 options which are listed below.
 
 
 
@@ -43,6 +43,7 @@ The JSon GSon dataformat supports 15 options which are listed below.
 | enableFeatures |  | String | Set of features to enable on the Jackson com.fasterxml.jackson.databind.ObjectMapper. The features should be a name that matches a enum from com.fasterxml.jackson.databind.SerializationFeature com.fasterxml.jackson.databind.DeserializationFeature or com.fasterxml.jackson.databind.MapperFeature Multiple features can be separated by comma
 | disableFeatures |  | String | Set of features to disable on the Jackson com.fasterxml.jackson.databind.ObjectMapper. The features should be a name that matches a enum from com.fasterxml.jackson.databind.SerializationFeature com.fasterxml.jackson.databind.DeserializationFeature or com.fasterxml.jackson.databind.MapperFeature Multiple features can be separated by comma
 | permissions |  | String | Adds permissions that controls which Java packages and classes XStream is allowed to use during unmarshal from xml/json to Java beans. A permission must be configured either here or globally using a JVM system property. The permission can be specified in a syntax where a plus sign is allow and minus sign is deny. Wildcards is supported by using . as prefix. For example to allow com.foo and all subpackages then specfy com.foo.. Multiple permissions can be configured separated by comma such as com.foo.-com.foo.bar.MySecretBean. The following default permission is always included: -java.lang.java.util. unless its overridden by specifying a JVM system property with they key org.apache.camel.xstream.permissions.
+| 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.
 |=======================================================================
 {% endraw %}
 // dataformat options: END

http://git-wip-us.apache.org/repos/asf/camel/blob/af3f54de/components/camel-jackson/src/main/docs/json-jackson-dataformat.adoc
----------------------------------------------------------------------
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 d6fe055..f8c2106 100644
--- a/components/camel-jackson/src/main/docs/json-jackson-dataformat.adoc
+++ b/components/camel-jackson/src/main/docs/json-jackson-dataformat.adoc
@@ -21,7 +21,7 @@ Jackson Options
 
 
 // dataformat options: START
-The JSon Jackson dataformat supports 15 options which are listed below.
+The JSon Jackson dataformat supports 16 options which are listed below.
 
 
 
@@ -44,6 +44,7 @@ The JSon Jackson dataformat supports 15 options which are listed below.
 | enableFeatures |  | String | Set of features to enable on the Jackson com.fasterxml.jackson.databind.ObjectMapper. The features should be a name that matches a enum from com.fasterxml.jackson.databind.SerializationFeature com.fasterxml.jackson.databind.DeserializationFeature or com.fasterxml.jackson.databind.MapperFeature Multiple features can be separated by comma
 | disableFeatures |  | String | Set of features to disable on the Jackson com.fasterxml.jackson.databind.ObjectMapper. The features should be a name that matches a enum from com.fasterxml.jackson.databind.SerializationFeature com.fasterxml.jackson.databind.DeserializationFeature or com.fasterxml.jackson.databind.MapperFeature Multiple features can be separated by comma
 | permissions |  | String | Adds permissions that controls which Java packages and classes XStream is allowed to use during unmarshal from xml/json to Java beans. A permission must be configured either here or globally using a JVM system property. The permission can be specified in a syntax where a plus sign is allow and minus sign is deny. Wildcards is supported by using . as prefix. For example to allow com.foo and all subpackages then specfy com.foo.. Multiple permissions can be configured separated by comma such as com.foo.-com.foo.bar.MySecretBean. The following default permission is always included: -java.lang.java.util. unless its overridden by specifying a JVM system property with they key org.apache.camel.xstream.permissions.
+| 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.
 |=======================================================================
 {% endraw %}
 // dataformat options: END

http://git-wip-us.apache.org/repos/asf/camel/blob/af3f54de/components/camel-johnzon/src/main/docs/json-johnzon-dataformat.adoc
----------------------------------------------------------------------
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 043c721..416cbf7 100644
--- a/components/camel-johnzon/src/main/docs/json-johnzon-dataformat.adoc
+++ b/components/camel-johnzon/src/main/docs/json-johnzon-dataformat.adoc
@@ -21,7 +21,7 @@ Johnzon Options
 
 
 // dataformat options: START
-The JSon Johnzon dataformat supports 15 options which are listed below.
+The JSon Johnzon dataformat supports 16 options which are listed below.
 
 
 
@@ -44,6 +44,7 @@ The JSon Johnzon dataformat supports 15 options which are listed below.
 | enableFeatures |  | String | Set of features to enable on the Jackson com.fasterxml.jackson.databind.ObjectMapper. The features should be a name that matches a enum from com.fasterxml.jackson.databind.SerializationFeature com.fasterxml.jackson.databind.DeserializationFeature or com.fasterxml.jackson.databind.MapperFeature Multiple features can be separated by comma
 | disableFeatures |  | String | Set of features to disable on the Jackson com.fasterxml.jackson.databind.ObjectMapper. The features should be a name that matches a enum from com.fasterxml.jackson.databind.SerializationFeature com.fasterxml.jackson.databind.DeserializationFeature or com.fasterxml.jackson.databind.MapperFeature Multiple features can be separated by comma
 | permissions |  | String | Adds permissions that controls which Java packages and classes XStream is allowed to use during unmarshal from xml/json to Java beans. A permission must be configured either here or globally using a JVM system property. The permission can be specified in a syntax where a plus sign is allow and minus sign is deny. Wildcards is supported by using . as prefix. For example to allow com.foo and all subpackages then specfy com.foo.. Multiple permissions can be configured separated by comma such as com.foo.-com.foo.bar.MySecretBean. The following default permission is always included: -java.lang.java.util. unless its overridden by specifying a JVM system property with they key org.apache.camel.xstream.permissions.
+| 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.
 |=======================================================================
 {% endraw %}
 // dataformat options: END

http://git-wip-us.apache.org/repos/asf/camel/blob/af3f54de/components/camel-xstream/src/main/docs/json-xstream-dataformat.adoc
----------------------------------------------------------------------
diff --git a/components/camel-xstream/src/main/docs/json-xstream-dataformat.adoc b/components/camel-xstream/src/main/docs/json-xstream-dataformat.adoc
index f310620..6faf974 100644
--- a/components/camel-xstream/src/main/docs/json-xstream-dataformat.adoc
+++ b/components/camel-xstream/src/main/docs/json-xstream-dataformat.adoc
@@ -27,7 +27,7 @@ Options
 ^^^^^^^
 
 // dataformat options: START
-The JSon XStream dataformat supports 15 options which are listed below.
+The JSon XStream dataformat supports 16 options which are listed below.
 
 
 
@@ -50,6 +50,7 @@ The JSon XStream dataformat supports 15 options which are listed below.
 | enableFeatures |  | String | Set of features to enable on the Jackson com.fasterxml.jackson.databind.ObjectMapper. The features should be a name that matches a enum from com.fasterxml.jackson.databind.SerializationFeature com.fasterxml.jackson.databind.DeserializationFeature or com.fasterxml.jackson.databind.MapperFeature Multiple features can be separated by comma
 | disableFeatures |  | String | Set of features to disable on the Jackson com.fasterxml.jackson.databind.ObjectMapper. The features should be a name that matches a enum from com.fasterxml.jackson.databind.SerializationFeature com.fasterxml.jackson.databind.DeserializationFeature or com.fasterxml.jackson.databind.MapperFeature Multiple features can be separated by comma
 | permissions |  | String | Adds permissions that controls which Java packages and classes XStream is allowed to use during unmarshal from xml/json to Java beans. A permission must be configured either here or globally using a JVM system property. The permission can be specified in a syntax where a plus sign is allow and minus sign is deny. Wildcards is supported by using . as prefix. For example to allow com.foo and all subpackages then specfy com.foo.. Multiple permissions can be configured separated by comma such as com.foo.-com.foo.bar.MySecretBean. The following default permission is always included: -java.lang.java.util. unless its overridden by specifying a JVM system property with they key org.apache.camel.xstream.permissions.
+| 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.
 |=======================================================================
 {% endraw %}
 // dataformat options: END


[2/3] camel git commit: CAMEL-10567: Camel-Jackson: Add an option to allow the UnmarshallType header use

Posted by ac...@apache.org.
CAMEL-10567: Camel-Jackson: Add an option to allow the UnmarshallType header use


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/02270ab9
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/02270ab9
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/02270ab9

Branch: refs/heads/master
Commit: 02270ab9c90ac0d59b85dbd59fb9c1007eb44a1b
Parents: 2b0e961
Author: Andrea Cosentino <an...@gmail.com>
Authored: Thu Dec 8 09:59:44 2016 +0100
Committer: Andrea Cosentino <an...@gmail.com>
Committed: Thu Dec 8 09:59:44 2016 +0100

----------------------------------------------------------------------
 .../camel/model/dataformat/JsonDataFormat.java    | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/02270ab9/camel-core/src/main/java/org/apache/camel/model/dataformat/JsonDataFormat.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/model/dataformat/JsonDataFormat.java b/camel-core/src/main/java/org/apache/camel/model/dataformat/JsonDataFormat.java
index 4ee2413..c275b2a 100644
--- a/camel-core/src/main/java/org/apache/camel/model/dataformat/JsonDataFormat.java
+++ b/camel-core/src/main/java/org/apache/camel/model/dataformat/JsonDataFormat.java
@@ -73,6 +73,8 @@ public class JsonDataFormat extends DataFormatDefinition {
     private String disableFeatures;
     @XmlAttribute
     private String permissions;
+    @XmlAttribute
+    private Boolean allowUnmarshallType;
 
     public JsonDataFormat() {
         super("json");
@@ -303,6 +305,19 @@ public class JsonDataFormat extends DataFormatDefinition {
         setPermissions(csb.toString());
     }
 
+    public Boolean getAllowUnmarshallType() {
+        return allowUnmarshallType;
+    }
+
+    /**
+     * If enabled then Jackson is allowed to attempt to use the CamelJacksonUnmarshalType header during the unmarshalling.
+     * <p/>
+     * This should only be enabled when desired to be used.
+     */
+    public void setAllowUnmarshallType(Boolean allowUnmarshallType) {
+        this.allowUnmarshallType = allowUnmarshallType;
+    }
+
     @Override
     public String getDataFormatName() {
         // json data format is special as the name can be from different bundles
@@ -385,6 +400,9 @@ public class JsonDataFormat extends DataFormatDefinition {
         if (permissions != null) {
             setProperty(camelContext, dataFormat, "permissions", permissions);
         }
+        if (allowUnmarshallType != null) {
+            setProperty(camelContext, dataFormat, "allowUnmarshallType", allowUnmarshallType);
+        }
         // if we have the unmarshal type, but no permission set, then use it to be allowed
         if (permissions == null && unmarshalType != null) {
             String allow = "+" + unmarshalType.getName();