Skip to content

Instantly share code, notes, and snippets.

@ncomet
Created September 16, 2020 08:54
Show Gist options
  • Save ncomet/7f8d79ddd56906938bc29e380adb6511 to your computer and use it in GitHub Desktop.
Save ncomet/7f8d79ddd56906938bc29e380adb6511 to your computer and use it in GitHub Desktop.
val obj = obj {
"key" to 3.4
"anotherKey" to arr["test", "test2", 1, 2.433, true]
"nullValue" to null
"emptyObject" to obj { }
"emptyArray" to arr
"custom" to ZonedDateTime.now()
}
println(obj) // 1
println(obj.pretty()) // 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment