Rename Jackson 2.x methods to 3.x equivalents for JsonNode
Apache 2.0Rename JsonNode methods that were renamed in 3.x (e.g., elements() to values(), fields() to entries()).
org. openrewrite. java. jackson. UpgradeJackson_2_3_JsonNodeMethodRenamesmod run . --recipe= org. openrewrite. java. jackson. UpgradeJackson_2_3_JsonNodeMethodRenamesInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.
Recipe list
It runs these recipes, in this order.
- Change method name
com.fasterxml.jackson.databind.JsonNode asText(..)toasString - Change method name
com.fasterxml.jackson.databind.JsonNode findValuesAsText(..)tofindValuesAsString - Change method name
com.fasterxml.jackson.databind.JsonNode isContainerNode()toisContainer - Change method name
com.fasterxml.jackson.databind.JsonNode isTextual()toisString - Replace
JsonNode.textValue()withstringValue(null) - Change method name
com.fasterxml.jackson.databind.JsonNode textValue()tostringValue - Change method name
com.fasterxml.jackson.databind.JsonNode with(..)towithObject - Migrate
JSONNodefield iterator for Jackson 3