June 2018 Update

This commit is contained in:
Ingy döt Net 2018-06-22 20:57:24 +00:00
parent ba8067c3b7
commit 22f33d4004
5278 changed files with 84726 additions and 14379 deletions

View file

@ -0,0 +1,15 @@
// version 1.2.21
data class JsonObject(val foo: Int, val bar: Array<String>)
data class JsonObject2(val ocean: String, val blue: Array<Int>)
fun main(args: Array<String>) {
// JSON to object
val data: JsonObject = JSON.parse("""{ "foo": 1, "bar": ["10", "apples"] }""")
println(JSON.stringify(data))
// object to JSON
val data2 = JsonObject2("water", arrayOf(1, 2))
println(JSON.stringify(data2))
}