
Serializer for TOON 3.0.1 with full spec support, encoding/decoding, JSON↔TOON conversion, char-array optimized performance and configurable delimiters, indentation, and key folding.
Kotlin serializer for TOON (Token-Oriented Object Notation).
To learn about the TOON format and why you should use it read the official website:
Using the Gradle Kotlin DSL:
// build.gradle.kts
dependencies {
implementation("com.lukelast.ktoon:ktoon:VERSION")
}Using Gradle Version Catalog:
# gradle/libs.versions.toml
[versions]
ktoon = "VERSION"
[libraries]
ktoon = { module = "com.lukelast.ktoon:ktoon", version.ref = "ktoon" }// build.gradle.kts
dependencies {
implementation(libs.ktoon)
}For multiplatform projects:
// build.gradle.kts
kotlin {
sourceSets {
commonMain.dependencies {
implementation("com.lukelast.ktoon:ktoon:VERSION")
}
}
}Using Maven:
<!-- pom.xml -->
<dependency>
<groupId>com.lukelast.ktoon</groupId>
<artifactId>ktoon-jvm</artifactId>
<version>VERSION</version>
</dependency>import com.lukelast.ktoon.Ktoon
import kotlinx.serialization.Serializable
@Serializable
data class User(val id: Int, val name: String)
fun main() {
val encoded = Ktoon.Default.encodeToString(User(1, "Alice"))
println(encoded)
}Check out the demo project in the demo directory for more examples on how to use Ktoon.
demo/README.md)
See the development guide for how to do development.
Kotlin serializer for TOON (Token-Oriented Object Notation).
To learn about the TOON format and why you should use it read the official website:
Using the Gradle Kotlin DSL:
// build.gradle.kts
dependencies {
implementation("com.lukelast.ktoon:ktoon:VERSION")
}Using Gradle Version Catalog:
# gradle/libs.versions.toml
[versions]
ktoon = "VERSION"
[libraries]
ktoon = { module = "com.lukelast.ktoon:ktoon", version.ref = "ktoon" }// build.gradle.kts
dependencies {
implementation(libs.ktoon)
}For multiplatform projects:
// build.gradle.kts
kotlin {
sourceSets {
commonMain.dependencies {
implementation("com.lukelast.ktoon:ktoon:VERSION")
}
}
}Using Maven:
<!-- pom.xml -->
<dependency>
<groupId>com.lukelast.ktoon</groupId>
<artifactId>ktoon-jvm</artifactId>
<version>VERSION</version>
</dependency>import com.lukelast.ktoon.Ktoon
import kotlinx.serialization.Serializable
@Serializable
data class User(val id: Int, val name: String)
fun main() {
val encoded = Ktoon.Default.encodeToString(User(1, "Alice"))
println(encoded)
}Check out the demo project in the demo directory for more examples on how to use Ktoon.
demo/README.md)
See the development guide for how to do development.