Skip to content

Instantly share code, notes, and snippets.

@RankoR
Created March 31, 2020 21:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RankoR/1e8f6d9407c97aa379d168409ef730a8 to your computer and use it in GitHub Desktop.
Save RankoR/1e8f6d9407c97aa379d168409ef730a8 to your computer and use it in GitHub Desktop.
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