Created
March 31, 2020 21:52
-
-
Save RankoR/1e8f6d9407c97aa379d168409ef730a8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Json() : JSONObject() { | |
constructor(init: Json.() -> Unit) : this() { | |
this.init() | |
} | |
infix fun String.to(value: Json) { | |
put(this, value) | |
} | |
infix fun <T> String.to(value: T) { | |
put(this, value) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment