• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // This file was automatically generated from json.md by Knit tool. Do not edit.
2 package example.exampleJson19
3 
4 import kotlinx.serialization.*
5 import kotlinx.serialization.json.*
6 
mainnull7 fun main() {
8     val element = buildJsonObject {
9         put("name", "kotlinx.serialization")
10         putJsonObject("owner") {
11             put("name", "kotlin")
12         }
13         putJsonArray("forks") {
14             addJsonObject {
15                 put("votes", 42)
16             }
17             addJsonObject {
18                 put("votes", 9000)
19             }
20         }
21     }
22     println(element)
23 }
24