Roman Elizarov | 5459c10 | 2020-08-11 12:27:36 +0300 | [diff] [blame] | 1 | // This file was automatically generated from builtin-classes.md by Knit tool. Do not edit. |
2 | package example.exampleBuiltin01 | ||||
3 | |||||
4 | import kotlinx.serialization.* | ||||
5 | import kotlinx.serialization.json.* | ||||
6 | |||||
7 | import kotlin.math.* | ||||
8 | |||||
9 | @Serializable | ||||
10 | class Data( | ||||
11 | val answer: Int, | ||||
12 | val pi: Double | ||||
13 | ) | ||||
14 | |||||
15 | fun main() { | ||||
16 | val data = Data(42, PI) | ||||
17 | println(Json.encodeToString(data)) | ||||
18 | } |