When upgrading from Codehaus to FasterXML, there's been a split in what gets configured where.
A custom recipe is likely in order to correctly migrate to @JsonInclude and the arguments there.
Describe the situation before & after applying the recipe
@Test
void jsonSerializeToJsonInclude() {
rewriteRun(
//language=java
java(
"""
import org.codehaus.jackson.map.annotate.JsonSerialize;
import static org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion.NON_NULL;
@JsonSerialize(include = NON_NULL)
class Test {
}
""",
"""
import com.fasterxml.jackson.annotation.JsonInclude;
import static com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL;
@JsonInclude(value = NON_NULL)
class Test {
}
"""
)
);
}
What problem are you trying to solve?
When upgrading from Codehaus to FasterXML, there's been a split in what gets configured where. A custom recipe is likely in order to correctly migrate to
@JsonInclude
and the arguments there.Describe the situation before & after applying the recipe
Any additional context