Skip to content

Instantly share code, notes, and snippets.

@hsyed
Created October 31, 2013 08:29
Show Gist options
  • Save hsyed/7246093 to your computer and use it in GitHub Desktop.
Save hsyed/7246093 to your computer and use it in GitHub Desktop.
uto ns = Namespace_("Testing");
ns.Struct("Person").
Fields({ {"name", 0, ":Text"},
{"birthdate", 1, ":Date"},
{"email", 2, ":Text"},
{"phones", 3, ":list(PhoneNumber)"} });
Struct("PhoneNumber").
Fields({ { "number", 0, ":Text"},
{ "type", 1, ":Type"} }).
Enum("Type", { {"mobile", 0 },
{"home", 1},
{"work", 2} }).
close().
close();
ns.Struct("Date").
Fields( { {"year", 0, ":Int16"},
{"month", 1, ":Uint8"},
{'day', 2, ":Uint8"} }).
close();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment