Skip to content

Instantly share code, notes, and snippets.

@si14
Created June 29, 2011 10:34
Show Gist options
  • Save si14/1053617 to your computer and use it in GitHub Desktop.
Save si14/1053617 to your computer and use it in GitHub Desktop.
-record(params_ping, {host :: nonempty_string()}).
-record(params_tcp, {host :: list(atom()),
port = 80 :: pos_integer(),
timeout :: pos_integer()}).
...SOME MAGIC...
{
"params_ping": {
"host": {
"type": {
"nonempty_string": []
}
}
},
"params_tcp": {
"host": {
"type": {
"list": [
{
"atom": []
}
]
}
},
"port": {
"type": {
"pos_integer": []
},
"default": 80
},
"timeout": {
"type": {
"pos_integer": []
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment