For adopters of earlier versions of kotlinx.serialization, a dedicated migration path is prepared.
During the preparation of serialization 1.0.0 release, most of the API has been changed, renamed, moved to
a separate package or made internal. IDEA migrations were introduced, but unfortunately not all API can be migrated
with automatic replacements.
To simplify your migrations path, it is recommended to enable star imports in IDE (so all extensions are imported automatically) first.
- Update
kotlinx.serializationto version1.0.0-RC2(this is the last version that has migrations for pre-1.0.0 versions. 1.0.0 version itself does not have any migration aids.) - Rename dependency from
kotlinx-serialization-runtimetokotlinx-serialization-json. - For multiplatform usages, remove dependencies to platform-specific artifacts (e.g.
kotlinx-serialization-runtime-js), they are no longer required by Gradle. - Update Kotlin to 1.4.0 or higher.
- Start applying replacements for the deprecated code.
- If some signatures are not resolved, try to hit
alt + Enterand import the signature. - If methods are still not resolved, it is recommended to use star imports for
kotlinx.serializationsignatures in the problematic file. - When there are no usages of deprecated code left, you can change dependency version from
1.0.0-RC2to1.0.0.
For less trivial issues, it is recommended to study the changelog or to ask for help in #serialization Kotlin's Slack channel.