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 2019/06/06 12:21:34 UTC

[camel] branch master updated (6c1186e -> 7701da0)

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

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


    from 6c1186e  CAMEL-13618: camel3 - Move FileWatcherReloadStrategy out of camel-core
     new 523017a  CAMEL-13619 - Camel-CBOR: Align options of the dataformat as the other Jackson dataformat, since CBORMapper extends ObjectMapper
     new f703f82  CAMEL-13619 - Fixed CS
     new 7701da0  CAMEL-13619 - Regen

The 3 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:
 .../camel-cbor/src/main/docs/cbor-dataformat.adoc  |  12 +-
 .../camel/component/cbor/CBORDataFormat.java       | 190 +++++++++++++++++++++
 .../camel/model/dataformat/CBORDataFormat.java     |  71 ++++++++
 .../reifier/dataformat/CBORDataFormatReifier.java  |  12 ++
 .../modules/ROOT/pages/cbor-dataformat.adoc        |  12 +-
 .../springboot/CBORDataFormatConfiguration.java    |  61 +++++++
 .../camel-spring-boot-dependencies/pom.xml         |   2 +-
 7 files changed, 355 insertions(+), 5 deletions(-)


[camel] 03/03: CAMEL-13619 - Regen

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

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

commit 7701da0635b7e3bce09f1fdc109a0392c0f65593
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Jun 6 14:20:46 2019 +0200

    CAMEL-13619 - Regen
---
 components/camel-cbor/src/main/docs/cbor-dataformat.adoc     |  6 +++++-
 docs/components/modules/ROOT/pages/cbor-dataformat.adoc      | 12 ++++++++++--
 .../spring-boot-dm/camel-spring-boot-dependencies/pom.xml    |  2 +-
 3 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/components/camel-cbor/src/main/docs/cbor-dataformat.adoc b/components/camel-cbor/src/main/docs/cbor-dataformat.adoc
index 950dfa4..173d0f7 100644
--- a/components/camel-cbor/src/main/docs/cbor-dataformat.adoc
+++ b/components/camel-cbor/src/main/docs/cbor-dataformat.adoc
@@ -55,18 +55,22 @@ When using Spring Boot make sure to use the following Maven dependency to have s
 ----
 
 
-The component supports 8 options, which are listed below.
+The component supports 12 options, which are listed below.
 
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
+| *camel.dataformat.cbor.allow-jms-type* | Used for JMS users to allow the JMSType header from the JMS spec to specify a FQN classname to use to unmarshal to. | false | Boolean
 | *camel.dataformat.cbor.allow-unmarshall-type* | If enabled then Jackson CBOR is allowed to attempt to use the CamelCBORUnmarshalType header during the unmarshalling. This should only be enabled when desired to be used. | false | Boolean
 | *camel.dataformat.cbor.collection-type-name* | Refers to a custom collection type to lookup in the registry to use. This option should rarely be used, but allows to use different collection types than java.util.Collection based as default. |  | String
 | *camel.dataformat.cbor.content-type-header* | 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. | false | Boolean
+| *camel.dataformat.cbor.disable-features* | 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 |  | String
+| *camel.dataformat.cbor.enable-features* | 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 |  | String
 | *camel.dataformat.cbor.enabled* | Whether to enable auto configuration of the cbor data format. This is enabled by default. |  | Boolean
 | *camel.dataformat.cbor.object-mapper* | Lookup and use the existing CBOR ObjectMapper with the given id when using Jackson. |  | String
+| *camel.dataformat.cbor.pretty-print* | To enable pretty printing output nicely formatted. Is by default false. | false | Boolean
 | *camel.dataformat.cbor.unmarshal-type-name* | Class name of the java type to use when unarmshalling |  | String
 | *camel.dataformat.cbor.use-default-object-mapper* | Whether to lookup and use default Jackson CBOR ObjectMapper from the registry. | true | Boolean
 | *camel.dataformat.cbor.use-list* | To unarmshal to a List of Map or a List of Pojo. | false | Boolean
diff --git a/docs/components/modules/ROOT/pages/cbor-dataformat.adoc b/docs/components/modules/ROOT/pages/cbor-dataformat.adoc
index bf7e263..173d0f7 100644
--- a/docs/components/modules/ROOT/pages/cbor-dataformat.adoc
+++ b/docs/components/modules/ROOT/pages/cbor-dataformat.adoc
@@ -19,7 +19,7 @@ from("activemq:My.Queue").
 ### CBOR Options
 
 // dataformat options: START
-The CBOR dataformat supports 7 options, which are listed below.
+The CBOR dataformat supports 11 options, which are listed below.
 
 
 
@@ -32,6 +32,10 @@ The CBOR dataformat supports 7 options, which are listed below.
 | collectionTypeName |  | String | Refers to a custom collection type to lookup in the registry to use. This option should rarely be used, but allows to use different collection types than java.util.Collection based as default.
 | useList | false | Boolean | To unarmshal to a List of Map or a List of Pojo.
 | allowUnmarshallType | false | Boolean | If enabled then Jackson CBOR is allowed to attempt to use the CamelCBORUnmarshalType header during the unmarshalling. This should only be enabled when desired to be used.
+| prettyPrint | false | Boolean | To enable pretty printing output nicely formatted. Is by default false.
+| allowJmsType | false | Boolean | Used for JMS users to allow the JMSType header from the JMS spec to specify a FQN classname to use to unmarshal to.
+| 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
 | 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
@@ -51,18 +55,22 @@ When using Spring Boot make sure to use the following Maven dependency to have s
 ----
 
 
-The component supports 8 options, which are listed below.
+The component supports 12 options, which are listed below.
 
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
+| *camel.dataformat.cbor.allow-jms-type* | Used for JMS users to allow the JMSType header from the JMS spec to specify a FQN classname to use to unmarshal to. | false | Boolean
 | *camel.dataformat.cbor.allow-unmarshall-type* | If enabled then Jackson CBOR is allowed to attempt to use the CamelCBORUnmarshalType header during the unmarshalling. This should only be enabled when desired to be used. | false | Boolean
 | *camel.dataformat.cbor.collection-type-name* | Refers to a custom collection type to lookup in the registry to use. This option should rarely be used, but allows to use different collection types than java.util.Collection based as default. |  | String
 | *camel.dataformat.cbor.content-type-header* | 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. | false | Boolean
+| *camel.dataformat.cbor.disable-features* | 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 |  | String
+| *camel.dataformat.cbor.enable-features* | 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 |  | String
 | *camel.dataformat.cbor.enabled* | Whether to enable auto configuration of the cbor data format. This is enabled by default. |  | Boolean
 | *camel.dataformat.cbor.object-mapper* | Lookup and use the existing CBOR ObjectMapper with the given id when using Jackson. |  | String
+| *camel.dataformat.cbor.pretty-print* | To enable pretty printing output nicely formatted. Is by default false. | false | Boolean
 | *camel.dataformat.cbor.unmarshal-type-name* | Class name of the java type to use when unarmshalling |  | String
 | *camel.dataformat.cbor.use-default-object-mapper* | Whether to lookup and use default Jackson CBOR ObjectMapper from the registry. | true | Boolean
 | *camel.dataformat.cbor.use-list* | To unarmshal to a List of Map or a List of Pojo. | false | Boolean
diff --git a/platforms/spring-boot/spring-boot-dm/camel-spring-boot-dependencies/pom.xml b/platforms/spring-boot/spring-boot-dm/camel-spring-boot-dependencies/pom.xml
index 8af8080..5bb47cd 100644
--- a/platforms/spring-boot/spring-boot-dm/camel-spring-boot-dependencies/pom.xml
+++ b/platforms/spring-boot/spring-boot-dm/camel-spring-boot-dependencies/pom.xml
@@ -3693,7 +3693,7 @@
       <dependency>
         <groupId>org.knowm.xchange</groupId>
         <artifactId>xchange-core</artifactId>
-        <version>4.3.18</version>
+        <version>4.3.19</version>
       </dependency>
       <dependency>
         <groupId>org.mozilla</groupId>


[camel] 02/03: CAMEL-13619 - Fixed CS

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

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

commit f703f82f56bd3ebc63eb41845f3d255e4fc47181
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Jun 6 13:29:03 2019 +0200

    CAMEL-13619 - Fixed CS
---
 .../src/main/java/org/apache/camel/component/cbor/CBORDataFormat.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/components/camel-cbor/src/main/java/org/apache/camel/component/cbor/CBORDataFormat.java b/components/camel-cbor/src/main/java/org/apache/camel/component/cbor/CBORDataFormat.java
index fb1e715..27ec345 100644
--- a/components/camel-cbor/src/main/java/org/apache/camel/component/cbor/CBORDataFormat.java
+++ b/components/camel-cbor/src/main/java/org/apache/camel/component/cbor/CBORDataFormat.java
@@ -315,7 +315,7 @@ public class CBORDataFormat extends ServiceSupport implements DataFormat, DataFo
         }
         
         if (prettyPrint) {
-        	objectMapper.enable(SerializationFeature.INDENT_OUTPUT);
+            objectMapper.enable(SerializationFeature.INDENT_OUTPUT);
         }
         
         if (enableFeatures != null) {


[camel] 01/03: CAMEL-13619 - Camel-CBOR: Align options of the dataformat as the other Jackson dataformat, since CBORMapper extends ObjectMapper

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

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

commit 523017a92475551951a08aaf2777401624f3333f
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Jun 6 13:27:16 2019 +0200

    CAMEL-13619 - Camel-CBOR: Align options of the dataformat as the other Jackson dataformat, since CBORMapper extends ObjectMapper
---
 .../camel-cbor/src/main/docs/cbor-dataformat.adoc  |   6 +-
 .../camel/component/cbor/CBORDataFormat.java       | 190 +++++++++++++++++++++
 .../camel/model/dataformat/CBORDataFormat.java     |  71 ++++++++
 .../reifier/dataformat/CBORDataFormatReifier.java  |  12 ++
 .../springboot/CBORDataFormatConfiguration.java    |  61 +++++++
 5 files changed, 339 insertions(+), 1 deletion(-)

diff --git a/components/camel-cbor/src/main/docs/cbor-dataformat.adoc b/components/camel-cbor/src/main/docs/cbor-dataformat.adoc
index bf7e263..950dfa4 100644
--- a/components/camel-cbor/src/main/docs/cbor-dataformat.adoc
+++ b/components/camel-cbor/src/main/docs/cbor-dataformat.adoc
@@ -19,7 +19,7 @@ from("activemq:My.Queue").
 ### CBOR Options
 
 // dataformat options: START
-The CBOR dataformat supports 7 options, which are listed below.
+The CBOR dataformat supports 11 options, which are listed below.
 
 
 
@@ -32,6 +32,10 @@ The CBOR dataformat supports 7 options, which are listed below.
 | collectionTypeName |  | String | Refers to a custom collection type to lookup in the registry to use. This option should rarely be used, but allows to use different collection types than java.util.Collection based as default.
 | useList | false | Boolean | To unarmshal to a List of Map or a List of Pojo.
 | allowUnmarshallType | false | Boolean | If enabled then Jackson CBOR is allowed to attempt to use the CamelCBORUnmarshalType header during the unmarshalling. This should only be enabled when desired to be used.
+| prettyPrint | false | Boolean | To enable pretty printing output nicely formatted. Is by default false.
+| allowJmsType | false | Boolean | Used for JMS users to allow the JMSType header from the JMS spec to specify a FQN classname to use to unmarshal to.
+| 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
 | 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-cbor/src/main/java/org/apache/camel/component/cbor/CBORDataFormat.java b/components/camel-cbor/src/main/java/org/apache/camel/component/cbor/CBORDataFormat.java
index b91ae11..fb1e715 100644
--- a/components/camel-cbor/src/main/java/org/apache/camel/component/cbor/CBORDataFormat.java
+++ b/components/camel-cbor/src/main/java/org/apache/camel/component/cbor/CBORDataFormat.java
@@ -21,9 +21,15 @@ import java.io.OutputStream;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
 import java.util.Set;
 
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.MapperFeature;
 import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializationFeature;
 import com.fasterxml.jackson.databind.type.CollectionType;
 import com.fasterxml.jackson.dataformat.cbor.CBORFactory;
 
@@ -32,6 +38,7 @@ import org.apache.camel.Exchange;
 import org.apache.camel.spi.DataFormat;
 import org.apache.camel.spi.DataFormatName;
 import org.apache.camel.spi.annotations.Dataformat;
+import org.apache.camel.support.ObjectHelper;
 import org.apache.camel.support.service.ServiceSupport;
 
 @Dataformat("cbor")
@@ -44,6 +51,11 @@ public class CBORDataFormat extends ServiceSupport implements DataFormat, DataFo
     private boolean allowUnmarshallType;
     private Class<? extends Collection> collectionType;
     private boolean useList;
+    private boolean prettyPrint;
+    private boolean allowJmsType;
+    private String enableFeatures;
+    private String disableFeatures;
+    private boolean enableJacksonTypeConverter;
 
     /**
      * Use the default CBOR Jackson {@link ObjectMapper} and {@link Object}
@@ -74,6 +86,9 @@ public class CBORDataFormat extends ServiceSupport implements DataFormat, DataFo
         if (allowUnmarshallType) {
             type = exchange.getIn().getHeader(CBORConstants.UNMARSHAL_TYPE, String.class);
         }
+        if (type == null && isAllowJmsType()) {
+            type = exchange.getIn().getHeader("JMSType", String.class);
+        }
         if (type != null) {
             clazz = exchange.getContext().getClassResolver().resolveMandatoryClass(type);
         }
@@ -89,6 +104,14 @@ public class CBORDataFormat extends ServiceSupport implements DataFormat, DataFo
     public String getDataFormatName() {
         return "cbor";
     }
+    
+    public CamelContext getCamelContext() {
+        return camelContext;
+    }
+
+    public void setCamelContext(CamelContext camelContext) {
+        this.camelContext = camelContext;
+    }
 
     public ObjectMapper getObjectMapper() {
         return objectMapper;
@@ -152,6 +175,120 @@ public class CBORDataFormat extends ServiceSupport implements DataFormat, DataFo
         setCollectionType(null);
         setUnmarshalType(HashMap.class);
     }
+    
+    public boolean isPrettyPrint() {
+        return prettyPrint;
+    }
+
+    public void setPrettyPrint(boolean prettyPrint) {
+        this.prettyPrint = prettyPrint;
+    }
+    
+    /**
+     * Allows jackson to use the <tt>JMSType</tt> header as an indicator what
+     * the classname is for unmarshaling json content to POJO
+     * <p/>
+     * By default this option is <tt>false</tt>.
+     */
+    public void setAllowJmsType(boolean allowJmsType) {
+        this.allowJmsType = allowJmsType;
+    }
+    
+    public boolean isAllowJmsType() {
+        return allowJmsType;
+    }
+    
+    public String getEnableFeatures() {
+        return enableFeatures;
+    }
+    
+    public boolean isEnableJacksonTypeConverter() {
+        return enableJacksonTypeConverter;
+    }
+
+    /**
+     * If enabled then Jackson is allowed to attempt to be used during Camels
+     * <a href="https://camel.apache.org/type-converter.html">type converter</a>
+     * as a {@link org.apache.camel.FallbackConverter} that attempts to convert
+     * POJOs to/from {@link Map}/{@link List} types.
+     * <p/>
+     * This should only be enabled when desired to be used.
+     */
+    public void setEnableJacksonTypeConverter(boolean enableJacksonTypeConverter) {
+        this.enableJacksonTypeConverter = enableJacksonTypeConverter;
+    }
+
+    /**
+     * Set of features to enable on the Jackson {@link ObjectMapper}. The
+     * features should be a name that matches a enum from
+     * {@link SerializationFeature}, {@link DeserializationFeature}, or
+     * {@link MapperFeature}.
+     */
+    public void setEnableFeatures(String enableFeatures) {
+        this.enableFeatures = enableFeatures;
+    }
+
+    public String getDisableFeatures() {
+        return disableFeatures;
+    }
+
+    /**
+     * Set of features to disable on the Jackson {@link ObjectMapper}. The
+     * features should be a name that matches a enum from
+     * {@link SerializationFeature}, {@link DeserializationFeature}, or
+     * {@link MapperFeature}.
+     */
+    public void setDisableFeatures(String disableFeatures) {
+        this.disableFeatures = disableFeatures;
+    }
+
+    public void enableFeature(SerializationFeature feature) {
+        if (enableFeatures == null) {
+            enableFeatures = feature.name();
+        } else {
+            enableFeatures += "," + feature.name();
+        }
+    }
+
+    public void enableFeature(DeserializationFeature feature) {
+        if (enableFeatures == null) {
+            enableFeatures = feature.name();
+        } else {
+            enableFeatures += "," + feature.name();
+        }
+    }
+
+    public void enableFeature(MapperFeature feature) {
+        if (enableFeatures == null) {
+            enableFeatures = feature.name();
+        } else {
+            enableFeatures += "," + feature.name();
+        }
+    }
+
+    public void disableFeature(SerializationFeature feature) {
+        if (disableFeatures == null) {
+            disableFeatures = feature.name();
+        } else {
+            disableFeatures += "," + feature.name();
+        }
+    }
+
+    public void disableFeature(DeserializationFeature feature) {
+        if (disableFeatures == null) {
+            disableFeatures = feature.name();
+        } else {
+            disableFeatures += "," + feature.name();
+        }
+    }
+
+    public void disableFeature(MapperFeature feature) {
+        if (disableFeatures == null) {
+            disableFeatures = feature.name();
+        } else {
+            disableFeatures += "," + feature.name();
+        }
+    }
 
     @Override
     protected void doStart() throws Exception {
@@ -176,6 +313,59 @@ public class CBORDataFormat extends ServiceSupport implements DataFormat, DataFo
         if (useList) {
             setCollectionType(ArrayList.class);
         }
+        
+        if (prettyPrint) {
+        	objectMapper.enable(SerializationFeature.INDENT_OUTPUT);
+        }
+        
+        if (enableFeatures != null) {
+            Iterator<?> it = ObjectHelper.createIterator(enableFeatures);
+            while (it.hasNext()) {
+                String enable = it.next().toString();
+                // it can be different kind
+                SerializationFeature sf = getCamelContext().getTypeConverter().tryConvertTo(SerializationFeature.class, enable);
+                if (sf != null) {
+                    objectMapper.enable(sf);
+                    continue;
+                }
+                DeserializationFeature df = getCamelContext().getTypeConverter().tryConvertTo(DeserializationFeature.class, enable);
+                if (df != null) {
+                    objectMapper.enable(df);
+                    continue;
+                }
+                MapperFeature mf = getCamelContext().getTypeConverter().tryConvertTo(MapperFeature.class, enable);
+                if (mf != null) {
+                    objectMapper.enable(mf);
+                    continue;
+                }
+                throw new IllegalArgumentException("Enable feature: " + enable
+                                                   + " cannot be converted to an accepted enum of types [SerializationFeature,DeserializationFeature,MapperFeature]");
+            }
+        }
+        if (disableFeatures != null) {
+            Iterator<?> it = ObjectHelper.createIterator(disableFeatures);
+            while (it.hasNext()) {
+                String disable = it.next().toString();
+                // it can be different kind
+                SerializationFeature sf = getCamelContext().getTypeConverter().tryConvertTo(SerializationFeature.class, disable);
+                if (sf != null) {
+                    objectMapper.disable(sf);
+                    continue;
+                }
+                DeserializationFeature df = getCamelContext().getTypeConverter().tryConvertTo(DeserializationFeature.class, disable);
+                if (df != null) {
+                    objectMapper.disable(df);
+                    continue;
+                }
+                MapperFeature mf = getCamelContext().getTypeConverter().tryConvertTo(MapperFeature.class, disable);
+                if (mf != null) {
+                    objectMapper.disable(mf);
+                    continue;
+                }
+                throw new IllegalArgumentException("Disable feature: " + disable
+                                                   + " cannot be converted to an accepted enum of types [SerializationFeature,DeserializationFeature,MapperFeature]");
+            }
+        }
     }
 
     @Override
diff --git a/core/camel-core/src/main/java/org/apache/camel/model/dataformat/CBORDataFormat.java b/core/camel-core/src/main/java/org/apache/camel/model/dataformat/CBORDataFormat.java
index 8a5a82e..3d91d35 100644
--- a/core/camel-core/src/main/java/org/apache/camel/model/dataformat/CBORDataFormat.java
+++ b/core/camel-core/src/main/java/org/apache/camel/model/dataformat/CBORDataFormat.java
@@ -50,6 +50,14 @@ public class CBORDataFormat extends DataFormatDefinition {
     private Boolean useList;
     @XmlAttribute
     private Boolean allowUnmarshallType;
+    @XmlAttribute
+    private Boolean prettyPrint;
+    @XmlAttribute
+    private Boolean allowJmsType;
+    @XmlAttribute
+    private String enableFeatures;
+    @XmlAttribute
+    private String disableFeatures;
 
     public CBORDataFormat() {
         super("cbor");
@@ -92,6 +100,31 @@ public class CBORDataFormat extends DataFormatDefinition {
     public Class<?> getUnmarshalType() {
         return unmarshalType;
     }
+    
+    public Boolean getPrettyPrint() {
+        return prettyPrint;
+    }
+
+    /**
+     * To enable pretty printing output nicely formatted.
+     * <p/>
+     * Is by default false.
+     */
+    public void setPrettyPrint(Boolean prettyPrint) {
+        this.prettyPrint = prettyPrint;
+    }
+    
+    public Boolean getAllowJmsType() {
+        return allowJmsType;
+    }
+
+    /**
+     * Used for JMS users to allow the JMSType header from the JMS spec to
+     * specify a FQN classname to use to unmarshal to.
+     */
+    public void setAllowJmsType(Boolean allowJmsType) {
+        this.allowJmsType = allowJmsType;
+    }
 
     /**
      * Class of the java type to use when unarmshalling
@@ -145,6 +178,44 @@ public class CBORDataFormat extends DataFormatDefinition {
     public void setAllowUnmarshallType(Boolean allowUnmarshallType) {
         this.allowUnmarshallType = allowUnmarshallType;
     }
+    
+    public String getEnableFeatures() {
+        return enableFeatures;
+    }
+
+    /**
+     * Set of features to enable on the Jackson
+     * <tt>com.fasterxml.jackson.databind.ObjectMapper</tt>.
+     * <p/>
+     * The features should be a name that matches a enum from
+     * <tt>com.fasterxml.jackson.databind.SerializationFeature</tt>,
+     * <tt>com.fasterxml.jackson.databind.DeserializationFeature</tt>, or
+     * <tt>com.fasterxml.jackson.databind.MapperFeature</tt>
+     * <p/>
+     * Multiple features can be separated by comma
+     */
+    public void setEnableFeatures(String enableFeatures) {
+        this.enableFeatures = enableFeatures;
+    }
+
+    public String getDisableFeatures() {
+        return disableFeatures;
+    }
+
+    /**
+     * Set of features to disable on the Jackson
+     * <tt>com.fasterxml.jackson.databind.ObjectMapper</tt>.
+     * <p/>
+     * The features should be a name that matches a enum from
+     * <tt>com.fasterxml.jackson.databind.SerializationFeature</tt>,
+     * <tt>com.fasterxml.jackson.databind.DeserializationFeature</tt>, or
+     * <tt>com.fasterxml.jackson.databind.MapperFeature</tt>
+     * <p/>
+     * Multiple features can be separated by comma
+     */
+    public void setDisableFeatures(String disableFeatures) {
+        this.disableFeatures = disableFeatures;
+    }
 
     @Override
     public String getDataFormatName() {
diff --git a/core/camel-core/src/main/java/org/apache/camel/reifier/dataformat/CBORDataFormatReifier.java b/core/camel-core/src/main/java/org/apache/camel/reifier/dataformat/CBORDataFormatReifier.java
index 5dfcb98..b0978fb 100644
--- a/core/camel-core/src/main/java/org/apache/camel/reifier/dataformat/CBORDataFormatReifier.java
+++ b/core/camel-core/src/main/java/org/apache/camel/reifier/dataformat/CBORDataFormatReifier.java
@@ -67,6 +67,18 @@ public class CBORDataFormatReifier extends DataFormatReifier<CBORDataFormat> {
         if (definition.getAllowUnmarshallType() != null) {
             setProperty(camelContext, dataFormat, "allowUnmarshallType", definition.getAllowUnmarshallType());
         }
+        if (definition.getPrettyPrint() != null) {
+            setProperty(camelContext, dataFormat, "prettyPrint", definition.getPrettyPrint());
+        }
+        if (definition.getAllowJmsType() != null) {
+            setProperty(camelContext, dataFormat, "allowJmsType", definition.getAllowJmsType());
+        }
+        if (definition.getEnableFeatures() != null) {
+            setProperty(camelContext, dataFormat, "enableFeatures", definition.getEnableFeatures());
+        }
+        if (definition.getDisableFeatures() != null) {
+            setProperty(camelContext, dataFormat, "disableFeatures", definition.getDisableFeatures());
+        }
     }
 
 }
diff --git a/platforms/spring-boot/components-starter/camel-cbor-starter/src/main/java/org/apache/camel/component/cbor/springboot/CBORDataFormatConfiguration.java b/platforms/spring-boot/components-starter/camel-cbor-starter/src/main/java/org/apache/camel/component/cbor/springboot/CBORDataFormatConfiguration.java
index 851bf7e..c7414cf 100644
--- a/platforms/spring-boot/components-starter/camel-cbor-starter/src/main/java/org/apache/camel/component/cbor/springboot/CBORDataFormatConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-cbor-starter/src/main/java/org/apache/camel/component/cbor/springboot/CBORDataFormatConfiguration.java
@@ -68,6 +68,35 @@ public class CBORDataFormatConfiguration
      */
     private Boolean allowUnmarshallType = false;
     /**
+     * To enable pretty printing output nicely formatted. Is by default false.
+     */
+    private Boolean prettyPrint = false;
+    /**
+     * Used for JMS users to allow the JMSType header from the JMS spec to
+     * specify a FQN classname to use to unmarshal to.
+     */
+    private Boolean allowJmsType = false;
+    /**
+     * 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
+     */
+    private String enableFeatures;
+    /**
+     * 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
+     */
+    private String disableFeatures;
+    /**
      * 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
@@ -123,6 +152,38 @@ public class CBORDataFormatConfiguration
         this.allowUnmarshallType = allowUnmarshallType;
     }
 
+    public Boolean getPrettyPrint() {
+        return prettyPrint;
+    }
+
+    public void setPrettyPrint(Boolean prettyPrint) {
+        this.prettyPrint = prettyPrint;
+    }
+
+    public Boolean getAllowJmsType() {
+        return allowJmsType;
+    }
+
+    public void setAllowJmsType(Boolean allowJmsType) {
+        this.allowJmsType = allowJmsType;
+    }
+
+    public String getEnableFeatures() {
+        return enableFeatures;
+    }
+
+    public void setEnableFeatures(String enableFeatures) {
+        this.enableFeatures = enableFeatures;
+    }
+
+    public String getDisableFeatures() {
+        return disableFeatures;
+    }
+
+    public void setDisableFeatures(String disableFeatures) {
+        this.disableFeatures = disableFeatures;
+    }
+
     public Boolean getContentTypeHeader() {
         return contentTypeHeader;
     }