From 6876b282d56983cc0296dc1ce5346503d8bc11e6 Mon Sep 17 00:00:00 2001 From: Tatu Saloranta Date: Mon, 30 Nov 2020 20:39:46 -0800 Subject: [PATCH] update afterburner/blackbird READMEs --- afterburner/README.md | 9 ++++++--- blackbird/README.md | 7 ++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/afterburner/README.md b/afterburner/README.md index fe527535..408a81c9 100644 --- a/afterburner/README.md +++ b/afterburner/README.md @@ -5,6 +5,8 @@ Afterburner plugs in using standard `Module` interface. ## Status Module is considered stable and has been used in production environments since version 2.2. +There is, however, a potential future replacement available (as of Jackson 2.12): Blackbird module. +See the parent README for details. [![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/) [![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: com.fasterxml.jackson.module jackson-module-afterburner - 2.7.1 + 2.12.0 ``` @@ -36,8 +38,9 @@ Module jar is also a functional OSGi bundle, with proper import/export declarati To use the the Module in Jackson, simply register it with the ObjectMapper instance: ```java -ObjectMapper mapper = new ObjectMapper() -mapper.registerModule(new AfterburnerModule()); +ObjectMapper mapper = JsonMapper.builder() + .addModule(new AfterburnerModule()) + .build(); ``` after which you just do data-binding as usual: diff --git a/blackbird/README.md b/blackbird/README.md index 190a6aba..2b712065 100644 --- a/blackbird/README.md +++ b/blackbird/README.md @@ -28,7 +28,7 @@ Blackbird passes all the original Afterburner tests (except a couple that didn't ### Maven dependency -Blackbird is available on Maven Central as of 2.10.0: +Blackbird is available on Maven Central as of 2.12.0: ```xml @@ -42,8 +42,9 @@ Blackbird is available on Maven Central as of 2.10.0: To use the the Module in Jackson, simply register it with the ObjectMapper instance: ```java -ObjectMapper mapper = new ObjectMapper() -mapper.registerModule(new BlackbirdModule()); +ObjectMapper mapper = JsonMapper.builder() + .addModule(new BlackbirdModule()) + .build(); ``` after which you just do data-binding as usual: