Last active
August 29, 2015 14:03
-
-
Save orangy/fd54b17ee6b1848e6b0c to your computer and use it in GitHub Desktop.
This file contains 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 JsonObject { | |
fun get(name : String) : JsonObject { | |
} | |
} | |
class JsonPathBuilder() { | |
fun String.div(name : String) : JsonPath { | |
} | |
fun JsonPath.div(name : String) : JsonPath { | |
} | |
fun JsonPath.div(item : JsonPath) : JsonPath { | |
} | |
} fun item(index: Int) : JsonPath { | |
} | |
} | |
class JsonPath() { | |
} | |
fun JsonObject.get(path: JsonPathBuilder.()-> JsonPath) { | |
} | |
fun fn(obj : JsonObject) { | |
obj.get { "response" / "artists" / item(0) / "name"} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment