← All recipes
Moderne licensed

Find deprecated json_encoders config option

Recipe IDorg.openrewrite.python.migrate.pydantic.FindDeprecatedJsonEncodersArtifactopenrewrite-migrate-python

Pydantic deprecated the json_encoders option in ConfigDict. Its replacements (@field_serializer / @model_serializer or Annotated[..., PlainSerializer(...)]) require restructuring, so this recipe flags its use for review.

Single recipepythonpydanticmigrationProprietary

Usage

This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.

mod run . --recipe org.openrewrite.python.migrate.pydantic.FindDeprecatedJsonEncoders

If the recipe isn’t available locally, install it with:

mod config recipes pip install openrewrite-migrate-python