Skip to content

Instantly share code, notes, and snippets.

@amal
Created October 18, 2014 16:27
Show Gist options
  • Save amal/d708b1f0f225174205f0 to your computer and use it in GitHub Desktop.
Save amal/d708b1f0f225174205f0 to your computer and use it in GitHub Desktop.
Example of DSL for JSON in Kotlin
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