You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: spring-integration-core/src/main/java/org/springframework/integration/support/json/BoonJsonObjectMapper.java
+4-1
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
/*
2
-
* Copyright 2014-2016 the original author or authors.
2
+
* Copyright 2014-2019 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -47,7 +47,10 @@
47
47
*
48
48
* @author Artem Bilan
49
49
* @since 4.1
50
+
*
51
+
* @deprecated since 5.2. Will be removed in the next version.
Copy file name to clipboardExpand all lines: spring-integration-core/src/main/java/org/springframework/integration/support/json/JsonObjectMapperProvider.java
+3-3
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
/*
2
-
* Copyright 2002-2017 the original author or authors.
2
+
* Copyright 2002-2019 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
Copy file name to clipboardExpand all lines: spring-integration-core/src/test/java/org/springframework/integration/json/JsonToObjectTransformerTests.java
Copy file name to clipboardExpand all lines: spring-integration-core/src/test/java/org/springframework/integration/json/JsonTransformersSymmetricalTests.java
Copy file name to clipboardExpand all lines: spring-integration-core/src/test/java/org/springframework/integration/json/ObjectToJsonTransformerParserTests-context.xml
Copy file name to clipboardExpand all lines: spring-integration-core/src/test/java/org/springframework/integration/json/ObjectToJsonTransformerParserTests.java
Copy file name to clipboardExpand all lines: spring-integration-core/src/test/java/org/springframework/integration/json/ObjectToJsonTransformerTests.java
When `markersJson` is true, the markers are represented as a JSON string, as long as a suitable JSON processor library (such as Jackson or Boon) is on the classpath.
1052
+
When `markersJson` is true, the markers are represented as a JSON string, as long as a suitable JSON processor library (e.g Jackson) is on the classpath.
1053
1053
1054
1054
Version 5.0 introduced the `firstLineAsHeader` option to specify that the first line of content is a header (such as column names in a CSV file).
1055
1055
The argument passed to this property is the header name under which the first line is carried as a header in the messages emitted for the remaining lines.
Copy file name to clipboardExpand all lines: src/reference/asciidoc/transformer.adoc
+6-5
Original file line number
Diff line number
Diff line change
@@ -343,16 +343,16 @@ You can provide your own custom `JsonObjectMapper` implementation with appropria
343
343
====
344
344
Beginning with version 3.0, the `object-mapper` attribute references an instance of a new strategy interface: `JsonObjectMapper`.
345
345
This abstraction lets multiple implementations of JSON mappers be used.
346
-
Implementations that wrap https://github.com/RichardHightower/boon[Boon] and https://github.com/FasterXML[Jackson 2] are provided, with the version being detected on the classpath.
347
-
These classes are `BoonJsonObjectMapper` and `Jackson2JsonObjectMapper`, respectively.
346
+
Implementation that wraps https://github.com/FasterXML[Jackson 2] is provided, with the version being detected on the classpath.
347
+
The class is `Jackson2JsonObjectMapper`, respectively.
348
348
349
-
Note, `BoonJsonObjectMapper` was added in version 4.1.
349
+
NOTE: The `BoonJsonObjectMapper` is deprecated in 5.2 since the library is out of support.
350
350
====
351
351
352
352
[IMPORTANT]
353
353
====
354
354
If you have requirements to use both Jackson and Boon in the same application, keep in mind that, before version 3.0, the JSON transformers used only Jackson 1.x.
355
-
From 4.1 on, the framework selects Jackson 2 by default, preferring it to the Boon implementation if both are on the classpath.
355
+
From 4.1 on, the framework selects Jackson 2 by default.
356
356
Jackson 1.x is no longer supported by the framework internally.
357
357
However, you can still use it within your code by including the necessary library.
358
358
To avoid unexpected issues with JSON mapping features when you use annotations, you may need to apply annotations from both Jackson and Boon on domain classes, as the following example shows:
@@ -373,6 +373,8 @@ public class Thing1 {
373
373
----
374
374
====
375
375
376
+
NOTE: The Boon support has been deprecated since version 5.2.
377
+
376
378
You may wish to consider using a `FactoryBean` or a factory method to create the `JsonObjectMapper` with the required characteristics.
377
379
The following example shows how to use such a factory:
378
380
@@ -444,7 +446,6 @@ The result node tree representation depends on the implementation of the provide
444
446
By default, the `ObjectToJsonTransformer` uses a `Jackson2JsonObjectMapper` and delegates the conversion of the object to the node tree to the `ObjectMapper#valueToTree` method.
445
447
The node JSON representation provides efficiency for using the `JsonPropertyAccessor` when the downstream message flow uses SpEL expressions with access to the properties of the JSON data.
446
448
See <<spel-property-accessors>> for more information.
447
-
When using Boon, the `NODE` representation is a `Map<String, Object>`
448
449
449
450
Beginning with version 5.1, the `resultType` can be configured as `BYTES` to produce a message with the `byte[]` payload for convenience when working with downstream handlers which operate with this data type.
0 commit comments