Replace removed JsonGenerator capability methods with StreamWriteCapability

Apache 2.0

In Jackson 3, JsonGenerator.canWriteBinaryNatively() and canWriteFormattedNumbers() were removed and replaced with the StreamWriteCapability enum. This recipe updates these method calls to use getWriteCapabilities().isEnabled(StreamWriteCapability.*) instead.

org.openrewrite.java.jackson.ReplaceStreamWriteCapability
mod run . --recipe=org.openrewrite.java.jackson.ReplaceStreamWriteCapability

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.