There has been a lot of changes recently with the release of the stable version. As stated in the release notes:

Json constructor is replaced with Json {} builder function, JsonConfiguration is deprecated in favor of Json {} builder

Your tutorial is outdated. I suggest you read the official docs instead.

As for dependencies, runtime was renamed to json in 1.0.0. You should have all of these:

// build.gradle
buildscript {
    repositories { 
        jcenter()
    }

    dependencies {
        classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlinVersion"
    }
}

// app/build.gradle
plugins {
    id "org.jetbrains.kotlin.plugin.serialization"
}

dependencies {
    implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:$serializationVersion"
}
Answer from Nicolas on Stack Overflow
🌐
Kotlin
kotlinlang.org › docs › serialization.html
Serialization | Kotlin Documentation
June 16, 2026 - When you're not using a specific format library, for example, when you're writing your own serialization format, use the kotlinx-serialization-core library as the dependency.
🌐
GitHub
github.com › kotlin › kotlinx.serialization
GitHub - Kotlin/kotlinx.serialization: Kotlin multiplatform / multi-format serialization · GitHub
To set up kotlinx.serialization, you have to do two things: Add the serialization plugin. Add the serialization library dependency.
Starred by 5.9K users
Forked by 677 users
Languages   Kotlin 99.9% | Java 0.1%
🌐
Baeldung
baeldung.com › home › libraries › an introduction to kotlinx-serialization project
An Introduction to kotlinx-serialization Project | Baeldung on Kotlin
April 15, 2025 - Also, we should note that, as the version suggests, JetBrains hasn’t released its major version yet and its API may change in the future. To use it in our project, we must include kotlinx-datetime artifact as a dependency in the pom.xml:
🌐
Maven Repository
mvnrepository.com › artifact › org.jetbrains.kotlinx › kotlinx-serialization-json-jvm
Maven Repository: org.jetbrains.kotlinx » kotlinx-serialization-json-jvm
April 9, 2026 - Dependency Injection · XML Processing · Concurrency Libraries · Web Frameworks · Android Platform · Code Generators · View All · Home » org.jetbrains.kotlinx » kotlinx-serialization-json-jvm · Kotlin multiplatform serialization runtime library · LicenseApache 2.0 ·
🌐
Medium
medium.com › @kerry.bisset › kotlin-serialization-json-mistakes-i-made-with-polymorphism-and-more-e8ae367dc90a
Kotlin Serialization — Json mistakes I made with Polymorphism and More. | by Kerry Bisset | Medium
July 15, 2024 - To start with Kotlin Serialization, include the necessary dependencies in your project. Here’s how you can set it up in a Gradle-based project: ... [versions] # Jetbrains and Kotlin Libraries kotlin = "2.0.0" kotlinx-serialization = "1.6.0" [libraries] kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinx-serialization" } [plugins] kotlinSerialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
🌐
Gradle
plugins.gradle.org › plugin › org.jetbrains.kotlin.plugin.serialization
Gradle - Plugin: org.jetbrains.kotlin.plugin.serialization
1 month ago - Kotlin compiler plugin for kotlinx.serialization library ... Adding the plugin to build logic for usage in precompiled script plugins. See the relevant documentation for more information. Add this plugin as a dependency to <convention-plugins-build>/build.gradle(.kts):
🌐
freeCodeCamp
freecodecamp.org › news › serializing-your-data-in-kotlin
How to Serialize Your Data in Kotlin and Jetpack Compose
February 1, 2023 - plugins { ... id 'org.jetbrains.kotlin.plugin.serialization' } At the bottom of the file, inside the dependencies section add implementation ‘org.jetbrains.kotlinx:kotlinx-serialization-json:X.Y.Z’: dependencies { ... implementation 'org.jetbrains.kotlinx:kotlinx-serialization-json:X.Y.Z' } Sync your project and you should be good to go.
Find elsewhere
🌐
Google
android.googlesource.com › platform › external › kotlinx.serialization › + › HEAD › README.md
Kotlin multiplatform / multi-format reflectionless serialization
After setting up the plugin, you have to add a dependency on the serialization library. Note that while the plugin has version the same as the compiler one, runtime library has different coordinates, repository and versioning. ... repositories { mavenCentral() } dependencies { implementati...
🌐
Medium
medium.com › @zorbeytorunoglu › serialization-and-deserialization-on-kotlin-android-81596ac6da8e
Serialization and Deserialization on Kotlin /& Android | Medium
May 18, 2024 - plugins { kotlin("plugin.serialization") version "1.5.31" } dependencies { implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.0") } Define a data class and annotate it with @Serializable: import kotlinx.serialization.* import kotlinx.serialization.json.* @Serializable data class User(val name: String, val age: Int, val email: String) fun main() { val user = User("John Doe", 30, "john.doe@example.com") // Serialize to JSON val jsonString = Json.encodeToString(user) println(jsonString) // {"name":"John Doe","age":30,"email":"john.doe@example.com"} // Deserialize from JSON val deserializedUser = Json.decodeFromString<User>(jsonString) println(deserializedUser) // User(name=John Doe, age=30, email=john.doe@example.com) } Gson is a Java library that can be used to convert Java Objects into their JSON representation and vice versa.
🌐
Kotlin
kotlinlang.org › docs › serialization-get-started.html
Get started with Kotlin serialization | Kotlin Documentation
// build.gradle.kts plugins { kotlin("plugin.serialization") version "2.4.10" } dependencies { implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.11.0") }
🌐
Medium
proandroiddev.com › introduction-to-using-kotlin-serialization-5bbfcf735aba
Introduction to using Kotlin Serialization | by ZhangKe | ProAndroidDev
March 29, 2024 - The first step is to convert the object tree into a sequence composed of basic data types, and the second step is to encode and output this sequence according to the format. Kotlin serialization tool is in a separate component.
🌐
Ktor
ktor.io › docs › client-serialization.html
Content negotiation and serialization in Ktor Client | Ktor Documentation
To learn more about artifacts required by the Ktor client, see Adding client dependencies. Note that serializers for specific formats require additional artifacts. For example, kotlinx.serialization requires the ktor-serialization-kotlinx-json ...
🌐
Joffrey-bion
joffrey-bion.github.io › krossbow › stomp › conversions › kx-serialization
STOMP with Kotlinx Serialization - Krossbow
Krossbow's base Kotlinx Serialization module is format-agnostic, so you need to add both the krossbow-stomp-kxserialization dependency and the Kotlinx Serialization dependency for the format you want to use.
🌐
Ktor
ktor.io › docs › server-serialization.html
Content negotiation and serialization in Ktor Server | Ktor Documentation
June 16, 2026 - Before using kotlinx.serialization converters, you need to add the Kotlin serialization plugin as described in the Setup section.
🌐
MongoDB
mongodb.com › docs home › client libraries › kotlin › kotlin coroutine driver › fundamentals
Kotlin Serialization - Kotlin Coroutine - MongoDB Docs
To use the Filters class from the ... add the mongodb-driver-kotlin-extensions dependency to your project. For more information, see the Add Kotlin Extensions to Your Project section of the Use Builders with Data Classes guide. The following example queries the orders collection for documents that have a brand field value of "Sherwin-Williams": You can create a custom serializer to handle how your data is represented in BSON. The Kotlin driver uses the KSerializer interface from the kotlinx.serialization package to implement custom serializers...
🌐
ITNEXT
itnext.io › first-class-kotlin-serialization-support-in-spring-boot-4-54a8e930c60b
First-Class Kotlin Serialization Support in Spring Boot 4 | by Hantsy | ITNEXT
December 26, 2025 - In your pom.xml, find the kotlin-maven-plugin and add the kotlinx-serialization plugin to its configuration section, then add the org.jetbrains.kotlin:kotlin-maven-serialization dependency to the plugin's dependencies section:
🌐
Maven Central
central.sonatype.com › artifact › org.jetbrains.kotlinx › kotlinx-serialization-json
org.jetbrains.kotlinx:kotlinx-serialization-json - Maven Central
Kotlin multiplatform serialization runtime library · Copy to clipboard · <dependency> <groupId>org.jetbrains.kotlinx</groupId> <artifactId>kotlinx-serialization-json</artifactId> <version>1.11.0</version> </dependency> Copy to clipboard ·