blob: 969cba9e5b4d90fe2e9a62b6360f9b67bd52d17f [file] [log] [blame]
// This file was automatically generated from basic-serialization.md by Knit tool. Do not edit.
package example.exampleClasses02
import kotlinx.serialization.*
import kotlinx.serialization.json.*
@Serializable
class Project private constructor(val owner: String, val name: String) {
constructor(path: String) : this(
owner = path.substringBefore('/'),
name = path.substringAfter('/')
)
val path: String
get() = "$owner/$name"
}
fun main() {
println(Json.encodeToString(Project("kotlin/kotlinx.serialization")))
}