blob: 8ea72ea245d1b0515654f2a9d48db3fb4d18d09d [file] [log] [blame]
// This file was automatically generated from basic-serialization.md by Knit tool. Do not edit.
package example.exampleClasses06
import kotlinx.serialization.*
import kotlinx.serialization.json.*
fun computeLanguage(): String {
println("Computing")
return "Kotlin"
}
@Serializable
data class Project(val name: String, val language: String = computeLanguage())
fun main() {
val data = Json.decodeFromString<Project>("""
{"name":"kotlinx.serialization","language":"Kotlin"}
""")
println(data)
}