Created
October 18, 2014 16:27
-
-
Save amal/d708b1f0f225174205f0 to your computer and use it in GitHub Desktop.
Example of DSL for JSON in Kotlin
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
json { | |
"name" - "Rob Ashton" | |
"age" - 5 | |
"address" - { | |
"number" - 444 | |
"line one" - "never you mind" | |
} | |
"family".array( | |
{ | |
"name" - "Gareth Ashton" | |
"relation" - "brother" | |
}, | |
{ | |
"name" - "Suxanne Ashton" | |
"relation" - "sister" | |
} | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment