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 2019/03/22 08:58:28 UTC

[camel] branch master updated: CAMEL-5836: json data format - Let jackson be default.

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 54ce4e3  CAMEL-5836: json data format - Let jackson be default.
54ce4e3 is described below

commit 54ce4e32ee7e3b865ef1482e6b1b54a69f081429
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Fri Mar 22 09:02:49 2019 +0100

    CAMEL-5836: json data format - Let jackson be default.
---
 MIGRATION.md                                                     | 4 ++++
 .../camel-fastjson/src/main/docs/json-fastjson-dataformat.adoc   | 2 +-
 components/camel-gson/src/main/docs/json-gson-dataformat.adoc    | 2 +-
 .../camel-jackson/src/main/docs/json-jackson-dataformat.adoc     | 2 +-
 .../camel/component/jackson/JacksonJsonDataFormatTest.java       | 9 +++++----
 .../camel/component/jackson/SpringJacksonJsonDataFormatTest.xml  | 4 ++--
 .../camel-johnzon/src/main/docs/json-johnzon-dataformat.adoc     | 2 +-
 .../camel-xstream/src/main/docs/json-xstream-dataformat.adoc     | 2 +-
 .../camel/dataformat/xstream/MarshalDomainObjectJSONTest.java    | 6 +++---
 .../dataformat/xstream/SpringMarshalDomainObjectJSONTest.xml     | 6 +++---
 .../java/org/apache/camel/model/dataformat/JsonDataFormat.java   | 4 ++--
 docs/components/modules/ROOT/pages/json-fastjson-dataformat.adoc | 2 +-
 docs/components/modules/ROOT/pages/json-gson-dataformat.adoc     | 2 +-
 docs/components/modules/ROOT/pages/json-jackson-dataformat.adoc  | 2 +-
 docs/components/modules/ROOT/pages/json-johnzon-dataformat.adoc  | 2 +-
 docs/components/modules/ROOT/pages/json-xstream-dataformat.adoc  | 2 +-
 .../fastjson/springboot/FastjsonDataFormatConfiguration.java     | 2 +-
 .../component/gson/springboot/GsonDataFormatConfiguration.java   | 2 +-
 .../jackson/springboot/JacksonDataFormatConfiguration.java       | 2 +-
 .../johnzon/springboot/JohnzonDataFormatConfiguration.java       | 2 +-
 .../xstream/springboot/JsonDataFormatConfiguration.java          | 2 +-
 21 files changed, 34 insertions(+), 29 deletions(-)

diff --git a/MIGRATION.md b/MIGRATION.md
index 686c7a9..5786ffe 100644
--- a/MIGRATION.md
+++ b/MIGRATION.md
@@ -141,6 +141,10 @@ The uri attribute has been deprecated, instead use value, which allows a shortha
 In Camel 2.x you could have 2 or more inputs to Camel routes, however this was not supported in all use-cases in Camel, and this functionality is seldom in use. This has
 also been deprecated in Camel 2.x. In Camel 3 we have removed the remaining code for specifying multipe inputs to routes, and its now only possible to specify exactly only 1 input to a route.
 
+### JSon DataFormat
+
+The default JSon library with the JSon dataformat has changed from `XStream` to `Jackson`.
+
 ### Moved APIs
 
 The following API changes may affect your existing Camel applications, which needs to be migrated.
diff --git a/components/camel-fastjson/src/main/docs/json-fastjson-dataformat.adoc b/components/camel-fastjson/src/main/docs/json-fastjson-dataformat.adoc
index 9c8681e..654f308 100644
--- a/components/camel-fastjson/src/main/docs/json-fastjson-dataformat.adoc
+++ b/components/camel-fastjson/src/main/docs/json-fastjson-dataformat.adoc
@@ -27,7 +27,7 @@ The JSon Fastjson dataformat supports 19 options, which are listed below.
 | objectMapper |  | String | Lookup and use the existing ObjectMapper with the given id when using Jackson.
 | useDefaultObjectMapper | true | Boolean | Whether to lookup and use default Jackson ObjectMapper from the registry.
 | prettyPrint | false | Boolean | To enable pretty printing output nicely formatted. Is by default false.
-| library | XStream | JsonLibrary | Which json library to use.
+| library | Jackson | JsonLibrary | Which json library to use.
 | unmarshalTypeName |  | String | Class name of the java type to use when unarmshalling
 | jsonView |  | Class | When marshalling a POJO to JSON you might want to exclude certain fields from the JSON output. With Jackson you can use JSON views to accomplish this. This option is to refer to the class which has JsonView annotations
 | include |  | String | If you want to marshal a pojo to JSON, and the pojo has some fields with null values. And you want to skip these null values, you can set this option to NON_NULL
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 5362104..fc34b4e 100644
--- a/components/camel-gson/src/main/docs/json-gson-dataformat.adoc
+++ b/components/camel-gson/src/main/docs/json-gson-dataformat.adoc
@@ -27,7 +27,7 @@ The JSon GSon dataformat supports 19 options, which are listed below.
 | objectMapper |  | String | Lookup and use the existing ObjectMapper with the given id when using Jackson.
 | useDefaultObjectMapper | true | Boolean | Whether to lookup and use default Jackson ObjectMapper from the registry.
 | prettyPrint | false | Boolean | To enable pretty printing output nicely formatted. Is by default false.
-| library | XStream | JsonLibrary | Which json library to use.
+| library | Jackson | JsonLibrary | Which json library to use.
 | unmarshalTypeName |  | String | Class name of the java type to use when unarmshalling
 | jsonView |  | Class | When marshalling a POJO to JSON you might want to exclude certain fields from the JSON output. With Jackson you can use JSON views to accomplish this. This option is to refer to the class which has JsonView annotations
 | include |  | String | If you want to marshal a pojo to JSON, and the pojo has some fields with null values. And you want to skip these null values, you can set this option to NON_NULL
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 dc08ff4..09f9ebe 100644
--- a/components/camel-jackson/src/main/docs/json-jackson-dataformat.adoc
+++ b/components/camel-jackson/src/main/docs/json-jackson-dataformat.adoc
@@ -28,7 +28,7 @@ The JSon Jackson dataformat supports 19 options, which are listed below.
 | objectMapper |  | String | Lookup and use the existing ObjectMapper with the given id when using Jackson.
 | useDefaultObjectMapper | true | Boolean | Whether to lookup and use default Jackson ObjectMapper from the registry.
 | prettyPrint | false | Boolean | To enable pretty printing output nicely formatted. Is by default false.
-| library | XStream | JsonLibrary | Which json library to use.
+| library | Jackson | JsonLibrary | Which json library to use.
 | unmarshalTypeName |  | String | Class name of the java type to use when unarmshalling
 | jsonView |  | Class | When marshalling a POJO to JSON you might want to exclude certain fields from the JSON output. With Jackson you can use JSON views to accomplish this. This option is to refer to the class which has JsonView annotations
 | include |  | String | If you want to marshal a pojo to JSON, and the pojo has some fields with null values. And you want to skip these null values, you can set this option to NON_NULL
diff --git a/components/camel-jackson/src/test/java/org/apache/camel/component/jackson/JacksonJsonDataFormatTest.java b/components/camel-jackson/src/test/java/org/apache/camel/component/jackson/JacksonJsonDataFormatTest.java
index 9e575e1..92aae09 100644
--- a/components/camel-jackson/src/test/java/org/apache/camel/component/jackson/JacksonJsonDataFormatTest.java
+++ b/components/camel-jackson/src/test/java/org/apache/camel/component/jackson/JacksonJsonDataFormatTest.java
@@ -26,11 +26,12 @@ public class JacksonJsonDataFormatTest extends JacksonMarshalTest {
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("direct:in").marshal().json(JsonLibrary.Jackson);
-                from("direct:back").unmarshal().json(JsonLibrary.Jackson).to("mock:reverse");
+                // jackson is default for json
+                from("direct:in").marshal().json();
+                from("direct:back").unmarshal().json().to("mock:reverse");
 
-                from("direct:inPretty").marshal().json(JsonLibrary.Jackson, true);
-                from("direct:backPretty").unmarshal().json(JsonLibrary.Jackson).to("mock:reverse");
+                from("direct:inPretty").marshal().json(true);
+                from("direct:backPretty").unmarshal().json().to("mock:reverse");
 
                 from("direct:inPojo").marshal().json(JsonLibrary.Jackson);
                 from("direct:backPojo").unmarshal().json(JsonLibrary.Jackson, TestPojo.class).to("mock:reversePojo");
diff --git a/components/camel-jackson/src/test/resources/org/apache/camel/component/jackson/SpringJacksonJsonDataFormatTest.xml b/components/camel-jackson/src/test/resources/org/apache/camel/component/jackson/SpringJacksonJsonDataFormatTest.xml
index 2ebbc25..39a72d2 100644
--- a/components/camel-jackson/src/test/resources/org/apache/camel/component/jackson/SpringJacksonJsonDataFormatTest.xml
+++ b/components/camel-jackson/src/test/resources/org/apache/camel/component/jackson/SpringJacksonJsonDataFormatTest.xml
@@ -30,8 +30,8 @@
         <!-- we define the json jackson data formats to be used -->
         <dataFormats>
             <!-- this uses the default unmarshal type that is a Map based -->
-            <json id="jack" library="Jackson"/>
-            <json id="pretty" library="Jackson" prettyPrint="true"/>
+            <json id="jack"/>
+            <json id="pretty" prettyPrint="true"/>
             <!-- and this one uses our own TestPojo class as unmarshal type -->
             <json id="pojo" library="Jackson" unmarshalTypeName="org.apache.camel.component.jackson.TestPojo"/>
             <!-- in addition to our own TestPojoView class we make use of the jsonView attribute here as filter -->
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 d14a095..9aa669d 100644
--- a/components/camel-johnzon/src/main/docs/json-johnzon-dataformat.adoc
+++ b/components/camel-johnzon/src/main/docs/json-johnzon-dataformat.adoc
@@ -28,7 +28,7 @@ The JSon Johnzon dataformat supports 19 options, which are listed below.
 | objectMapper |  | String | Lookup and use the existing ObjectMapper with the given id when using Jackson.
 | useDefaultObjectMapper | true | Boolean | Whether to lookup and use default Jackson ObjectMapper from the registry.
 | prettyPrint | false | Boolean | To enable pretty printing output nicely formatted. Is by default false.
-| library | XStream | JsonLibrary | Which json library to use.
+| library | Jackson | JsonLibrary | Which json library to use.
 | unmarshalTypeName |  | String | Class name of the java type to use when unarmshalling
 | jsonView |  | Class | When marshalling a POJO to JSON you might want to exclude certain fields from the JSON output. With Jackson you can use JSON views to accomplish this. This option is to refer to the class which has JsonView annotations
 | include |  | String | If you want to marshal a pojo to JSON, and the pojo has some fields with null values. And you want to skip these null values, you can set this option to NON_NULL
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 84b5385..bb18363 100644
--- a/components/camel-xstream/src/main/docs/json-xstream-dataformat.adoc
+++ b/components/camel-xstream/src/main/docs/json-xstream-dataformat.adoc
@@ -36,7 +36,7 @@ The JSon XStream dataformat supports 19 options, which are listed below.
 | objectMapper |  | String | Lookup and use the existing ObjectMapper with the given id when using Jackson.
 | useDefaultObjectMapper | true | Boolean | Whether to lookup and use default Jackson ObjectMapper from the registry.
 | prettyPrint | false | Boolean | To enable pretty printing output nicely formatted. Is by default false.
-| library | XStream | JsonLibrary | Which json library to use.
+| library | Jackson | JsonLibrary | Which json library to use.
 | unmarshalTypeName |  | String | Class name of the java type to use when unarmshalling
 | jsonView |  | Class | When marshalling a POJO to JSON you might want to exclude certain fields from the JSON output. With Jackson you can use JSON views to accomplish this. This option is to refer to the class which has JsonView annotations
 | include |  | String | If you want to marshal a pojo to JSON, and the pojo has some fields with null values. And you want to skip these null values, you can set this option to NON_NULL
diff --git a/components/camel-xstream/src/test/java/org/apache/camel/dataformat/xstream/MarshalDomainObjectJSONTest.java b/components/camel-xstream/src/test/java/org/apache/camel/dataformat/xstream/MarshalDomainObjectJSONTest.java
index b36e601..a1d976c 100644
--- a/components/camel-xstream/src/test/java/org/apache/camel/dataformat/xstream/MarshalDomainObjectJSONTest.java
+++ b/components/camel-xstream/src/test/java/org/apache/camel/dataformat/xstream/MarshalDomainObjectJSONTest.java
@@ -53,14 +53,14 @@ public class MarshalDomainObjectJSONTest extends MarshalDomainObjectTest {
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
             public void configure() throws Exception {
-                from("direct:in").marshal().json().to("mock:result");
+                from("direct:in").marshal().json(JsonLibrary.XStream).to("mock:result");
 
                 // just used for helping to marshal
-                from("direct:marshal").marshal().json();
+                from("direct:marshal").marshal().json(JsonLibrary.XStream);
 
                 from("direct:reverse").unmarshal().json(JsonLibrary.XStream, PurchaseOrder.class).to("mock:reverse");
 
-                from("direct:inPretty").marshal().json(true);
+                from("direct:inPretty").marshal().json(JsonLibrary.XStream, true);
                 from("direct:backPretty").unmarshal().json(JsonLibrary.XStream, PurchaseOrder.class, true).to("mock:reverse");
             }
         };
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 cba1eab..5be5077 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
@@ -27,10 +27,10 @@
     <!-- START SNIPPET: e1 -->
     <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
         
-        <!-- we define the json xstream data formats to be used (xstream is default) -->
+        <!-- we define the json xstream data formats to be used -->
         <dataFormats>
-            <json id="json" unmarshalTypeName="org.apache.camel.dataformat.xstream.PurchaseOrder"/>
-            <json id="pretty" prettyPrint="true" unmarshalTypeName="org.apache.camel.dataformat.xstream.PurchaseOrder"/>
+            <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"/>
         </dataFormats>
 
         <route>
diff --git a/core/camel-core/src/main/java/org/apache/camel/model/dataformat/JsonDataFormat.java b/core/camel-core/src/main/java/org/apache/camel/model/dataformat/JsonDataFormat.java
index 4c5e157..f8ebd20 100644
--- a/core/camel-core/src/main/java/org/apache/camel/model/dataformat/JsonDataFormat.java
+++ b/core/camel-core/src/main/java/org/apache/camel/model/dataformat/JsonDataFormat.java
@@ -46,8 +46,8 @@ public class JsonDataFormat extends DataFormatDefinition {
     @XmlAttribute
     private Boolean prettyPrint;
     @XmlAttribute
-    @Metadata(defaultValue = "XStream")
-    private JsonLibrary library = JsonLibrary.XStream;
+    @Metadata(defaultValue = "Jackson")
+    private JsonLibrary library = JsonLibrary.Jackson;
     @XmlAttribute
     private String unmarshalTypeName;
     @XmlTransient
diff --git a/docs/components/modules/ROOT/pages/json-fastjson-dataformat.adoc b/docs/components/modules/ROOT/pages/json-fastjson-dataformat.adoc
index 9c8681e..654f308 100644
--- a/docs/components/modules/ROOT/pages/json-fastjson-dataformat.adoc
+++ b/docs/components/modules/ROOT/pages/json-fastjson-dataformat.adoc
@@ -27,7 +27,7 @@ The JSon Fastjson dataformat supports 19 options, which are listed below.
 | objectMapper |  | String | Lookup and use the existing ObjectMapper with the given id when using Jackson.
 | useDefaultObjectMapper | true | Boolean | Whether to lookup and use default Jackson ObjectMapper from the registry.
 | prettyPrint | false | Boolean | To enable pretty printing output nicely formatted. Is by default false.
-| library | XStream | JsonLibrary | Which json library to use.
+| library | Jackson | JsonLibrary | Which json library to use.
 | unmarshalTypeName |  | String | Class name of the java type to use when unarmshalling
 | jsonView |  | Class | When marshalling a POJO to JSON you might want to exclude certain fields from the JSON output. With Jackson you can use JSON views to accomplish this. This option is to refer to the class which has JsonView annotations
 | include |  | String | If you want to marshal a pojo to JSON, and the pojo has some fields with null values. And you want to skip these null values, you can set this option to NON_NULL
diff --git a/docs/components/modules/ROOT/pages/json-gson-dataformat.adoc b/docs/components/modules/ROOT/pages/json-gson-dataformat.adoc
index 5362104..fc34b4e 100644
--- a/docs/components/modules/ROOT/pages/json-gson-dataformat.adoc
+++ b/docs/components/modules/ROOT/pages/json-gson-dataformat.adoc
@@ -27,7 +27,7 @@ The JSon GSon dataformat supports 19 options, which are listed below.
 | objectMapper |  | String | Lookup and use the existing ObjectMapper with the given id when using Jackson.
 | useDefaultObjectMapper | true | Boolean | Whether to lookup and use default Jackson ObjectMapper from the registry.
 | prettyPrint | false | Boolean | To enable pretty printing output nicely formatted. Is by default false.
-| library | XStream | JsonLibrary | Which json library to use.
+| library | Jackson | JsonLibrary | Which json library to use.
 | unmarshalTypeName |  | String | Class name of the java type to use when unarmshalling
 | jsonView |  | Class | When marshalling a POJO to JSON you might want to exclude certain fields from the JSON output. With Jackson you can use JSON views to accomplish this. This option is to refer to the class which has JsonView annotations
 | include |  | String | If you want to marshal a pojo to JSON, and the pojo has some fields with null values. And you want to skip these null values, you can set this option to NON_NULL
diff --git a/docs/components/modules/ROOT/pages/json-jackson-dataformat.adoc b/docs/components/modules/ROOT/pages/json-jackson-dataformat.adoc
index dc08ff4..09f9ebe 100644
--- a/docs/components/modules/ROOT/pages/json-jackson-dataformat.adoc
+++ b/docs/components/modules/ROOT/pages/json-jackson-dataformat.adoc
@@ -28,7 +28,7 @@ The JSon Jackson dataformat supports 19 options, which are listed below.
 | objectMapper |  | String | Lookup and use the existing ObjectMapper with the given id when using Jackson.
 | useDefaultObjectMapper | true | Boolean | Whether to lookup and use default Jackson ObjectMapper from the registry.
 | prettyPrint | false | Boolean | To enable pretty printing output nicely formatted. Is by default false.
-| library | XStream | JsonLibrary | Which json library to use.
+| library | Jackson | JsonLibrary | Which json library to use.
 | unmarshalTypeName |  | String | Class name of the java type to use when unarmshalling
 | jsonView |  | Class | When marshalling a POJO to JSON you might want to exclude certain fields from the JSON output. With Jackson you can use JSON views to accomplish this. This option is to refer to the class which has JsonView annotations
 | include |  | String | If you want to marshal a pojo to JSON, and the pojo has some fields with null values. And you want to skip these null values, you can set this option to NON_NULL
diff --git a/docs/components/modules/ROOT/pages/json-johnzon-dataformat.adoc b/docs/components/modules/ROOT/pages/json-johnzon-dataformat.adoc
index d14a095..9aa669d 100644
--- a/docs/components/modules/ROOT/pages/json-johnzon-dataformat.adoc
+++ b/docs/components/modules/ROOT/pages/json-johnzon-dataformat.adoc
@@ -28,7 +28,7 @@ The JSon Johnzon dataformat supports 19 options, which are listed below.
 | objectMapper |  | String | Lookup and use the existing ObjectMapper with the given id when using Jackson.
 | useDefaultObjectMapper | true | Boolean | Whether to lookup and use default Jackson ObjectMapper from the registry.
 | prettyPrint | false | Boolean | To enable pretty printing output nicely formatted. Is by default false.
-| library | XStream | JsonLibrary | Which json library to use.
+| library | Jackson | JsonLibrary | Which json library to use.
 | unmarshalTypeName |  | String | Class name of the java type to use when unarmshalling
 | jsonView |  | Class | When marshalling a POJO to JSON you might want to exclude certain fields from the JSON output. With Jackson you can use JSON views to accomplish this. This option is to refer to the class which has JsonView annotations
 | include |  | String | If you want to marshal a pojo to JSON, and the pojo has some fields with null values. And you want to skip these null values, you can set this option to NON_NULL
diff --git a/docs/components/modules/ROOT/pages/json-xstream-dataformat.adoc b/docs/components/modules/ROOT/pages/json-xstream-dataformat.adoc
index 84b5385..bb18363 100644
--- a/docs/components/modules/ROOT/pages/json-xstream-dataformat.adoc
+++ b/docs/components/modules/ROOT/pages/json-xstream-dataformat.adoc
@@ -36,7 +36,7 @@ The JSon XStream dataformat supports 19 options, which are listed below.
 | objectMapper |  | String | Lookup and use the existing ObjectMapper with the given id when using Jackson.
 | useDefaultObjectMapper | true | Boolean | Whether to lookup and use default Jackson ObjectMapper from the registry.
 | prettyPrint | false | Boolean | To enable pretty printing output nicely formatted. Is by default false.
-| library | XStream | JsonLibrary | Which json library to use.
+| library | Jackson | JsonLibrary | Which json library to use.
 | unmarshalTypeName |  | String | Class name of the java type to use when unarmshalling
 | jsonView |  | Class | When marshalling a POJO to JSON you might want to exclude certain fields from the JSON output. With Jackson you can use JSON views to accomplish this. This option is to refer to the class which has JsonView annotations
 | include |  | String | If you want to marshal a pojo to JSON, and the pojo has some fields with null values. And you want to skip these null values, you can set this option to NON_NULL
diff --git a/platforms/spring-boot/components-starter/camel-fastjson-starter/src/main/java/org/apache/camel/component/fastjson/springboot/FastjsonDataFormatConfiguration.java b/platforms/spring-boot/components-starter/camel-fastjson-starter/src/main/java/org/apache/camel/component/fastjson/springboot/FastjsonDataFormatConfiguration.java
index 3c73368..0c38742 100644
--- a/platforms/spring-boot/components-starter/camel-fastjson-starter/src/main/java/org/apache/camel/component/fastjson/springboot/FastjsonDataFormatConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-fastjson-starter/src/main/java/org/apache/camel/component/fastjson/springboot/FastjsonDataFormatConfiguration.java
@@ -55,7 +55,7 @@ public class FastjsonDataFormatConfiguration
     /**
      * Which json library to use.
      */
-    private JsonLibrary library = JsonLibrary.XStream;
+    private JsonLibrary library = JsonLibrary.Jackson;
     /**
      * Class name of the java type to use when unarmshalling
      */
diff --git a/platforms/spring-boot/components-starter/camel-gson-starter/src/main/java/org/apache/camel/component/gson/springboot/GsonDataFormatConfiguration.java b/platforms/spring-boot/components-starter/camel-gson-starter/src/main/java/org/apache/camel/component/gson/springboot/GsonDataFormatConfiguration.java
index 6b06c69..1ebb782 100644
--- a/platforms/spring-boot/components-starter/camel-gson-starter/src/main/java/org/apache/camel/component/gson/springboot/GsonDataFormatConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-gson-starter/src/main/java/org/apache/camel/component/gson/springboot/GsonDataFormatConfiguration.java
@@ -55,7 +55,7 @@ public class GsonDataFormatConfiguration
     /**
      * Which json library to use.
      */
-    private JsonLibrary library = JsonLibrary.XStream;
+    private JsonLibrary library = JsonLibrary.Jackson;
     /**
      * Class name of the java type to use when unarmshalling
      */
diff --git a/platforms/spring-boot/components-starter/camel-jackson-starter/src/main/java/org/apache/camel/component/jackson/springboot/JacksonDataFormatConfiguration.java b/platforms/spring-boot/components-starter/camel-jackson-starter/src/main/java/org/apache/camel/component/jackson/springboot/JacksonDataFormatConfiguration.java
index a36301d..6dd45cc 100644
--- a/platforms/spring-boot/components-starter/camel-jackson-starter/src/main/java/org/apache/camel/component/jackson/springboot/JacksonDataFormatConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-jackson-starter/src/main/java/org/apache/camel/component/jackson/springboot/JacksonDataFormatConfiguration.java
@@ -55,7 +55,7 @@ public class JacksonDataFormatConfiguration
     /**
      * Which json library to use.
      */
-    private JsonLibrary library = JsonLibrary.XStream;
+    private JsonLibrary library = JsonLibrary.Jackson;
     /**
      * Class name of the java type to use when unarmshalling
      */
diff --git a/platforms/spring-boot/components-starter/camel-johnzon-starter/src/main/java/org/apache/camel/component/johnzon/springboot/JohnzonDataFormatConfiguration.java b/platforms/spring-boot/components-starter/camel-johnzon-starter/src/main/java/org/apache/camel/component/johnzon/springboot/JohnzonDataFormatConfiguration.java
index 1bfbb83..e8498e5 100644
--- a/platforms/spring-boot/components-starter/camel-johnzon-starter/src/main/java/org/apache/camel/component/johnzon/springboot/JohnzonDataFormatConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-johnzon-starter/src/main/java/org/apache/camel/component/johnzon/springboot/JohnzonDataFormatConfiguration.java
@@ -55,7 +55,7 @@ public class JohnzonDataFormatConfiguration
     /**
      * Which json library to use.
      */
-    private JsonLibrary library = JsonLibrary.XStream;
+    private JsonLibrary library = JsonLibrary.Jackson;
     /**
      * Class name of the java type to use when unarmshalling
      */
diff --git a/platforms/spring-boot/components-starter/camel-xstream-starter/src/main/java/org/apache/camel/dataformat/xstream/springboot/JsonDataFormatConfiguration.java b/platforms/spring-boot/components-starter/camel-xstream-starter/src/main/java/org/apache/camel/dataformat/xstream/springboot/JsonDataFormatConfiguration.java
index 5925aca..e45432f 100644
--- a/platforms/spring-boot/components-starter/camel-xstream-starter/src/main/java/org/apache/camel/dataformat/xstream/springboot/JsonDataFormatConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-xstream-starter/src/main/java/org/apache/camel/dataformat/xstream/springboot/JsonDataFormatConfiguration.java
@@ -55,7 +55,7 @@ public class JsonDataFormatConfiguration
     /**
      * Which json library to use.
      */
-    private JsonLibrary library = JsonLibrary.XStream;
+    private JsonLibrary library = JsonLibrary.Jackson;
     /**
      * Class name of the java type to use when unarmshalling
      */