Migrate deprecated @JsonSerialize(include = ...) to @JsonInclude

Apache 2.0

Move the deprecated include attribute of FasterXML's @JsonSerialize to a separate @JsonInclude annotation. The include attribute was deprecated in Jackson 2.x and removed in Jackson 3.x; running this recipe before the Jackson 2 → 3 package rename produces a correct tools.jackson.annotation.JsonInclude on the Jackson 3 side.

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

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