File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ Afterburner plugs in using standard `Module` interface.
5
5
## Status
6
6
7
7
Module is considered stable and has been used in production environments since version 2.2.
8
+ There is, however, a potential future replacement available (as of Jackson 2.12): Blackbird module.
9
+ See the parent README for details.
8
10
9
11
[ ![ Maven Central] ( https://maven-badges.herokuapp.com/maven-central/com.fasterxml.jackson.module/jackson-module-afterburner/badge.svg )] ( https://maven-badges.herokuapp.com/maven-central/com.fasterxml.jackson.module/jackson-module-afterburner/ )
10
12
[ ![ Javadoc] ( https://javadoc-emblem.rhcloud.com/doc/com.fasterxml.jackson.module/jackson-module-afterburner/badge.svg )] ( http://www.javadoc.io/doc/com.fasterxml.jackson.module/jackson-module-afterburner )
@@ -19,7 +21,7 @@ To use module on Maven-based projects, use following dependency:
19
21
<dependency >
20
22
<groupId >com.fasterxml.jackson.module</groupId >
21
23
<artifactId >jackson-module-afterburner</artifactId >
22
- <version >2.7.1 </version >
24
+ <version >2.12.0 </version >
23
25
</dependency >
24
26
```
25
27
@@ -36,8 +38,9 @@ Module jar is also a functional OSGi bundle, with proper import/export declarati
36
38
To use the the Module in Jackson, simply register it with the ObjectMapper instance:
37
39
38
40
``` java
39
- ObjectMapper mapper = new ObjectMapper ()
40
- mapper. registerModule(new AfterburnerModule ());
41
+ ObjectMapper mapper = JsonMapper . builder()
42
+ .addModule(new AfterburnerModule ())
43
+ .build();
41
44
```
42
45
43
46
after which you just do data-binding as usual:
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ Blackbird passes all the original Afterburner tests (except a couple that didn't
28
28
29
29
### Maven dependency
30
30
31
- Blackbird is available on Maven Central as of 2.10 .0:
31
+ Blackbird is available on Maven Central as of 2.12 .0:
32
32
33
33
``` xml
34
34
<dependency >
@@ -42,8 +42,9 @@ Blackbird is available on Maven Central as of 2.10.0:
42
42
To use the the Module in Jackson, simply register it with the ObjectMapper instance:
43
43
44
44
``` java
45
- ObjectMapper mapper = new ObjectMapper ()
46
- mapper. registerModule(new BlackbirdModule ());
45
+ ObjectMapper mapper = JsonMapper . builder()
46
+ .addModule(new BlackbirdModule ())
47
+ .build();
47
48
```
48
49
49
50
after which you just do data-binding as usual:
You can’t perform that action at this time.
0 commit comments