Migrate encoding/json to encoding/json/v2, preserving v1 semantics

Proprietary

Migrate encoding/json to encoding/json/v2 while preserving v1 behavior, by composing MigrateToJSONV2 and PreserveV1Semantics. Use it instead of MigrateToJSONV2 for a low-disruption migration.

org.openrewrite.golang.migration.MigrateToJSONV2PreservingV1
mod run . --recipe=org.openrewrite.golang.migration.MigrateToJSONV2PreservingV1

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