Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
22 lines (18 sloc) 605 Bytes
JsonTpl is an Erlang library for building JSON Encoder/Decoder for Erlang by template.
Using:
1) add "prib/bintpl" dir to you project
2) add "*.tpl" files to this dir.
3) run "jsontpl:build(Project, FileName)." from Erlang console
Template example (for example.tpl):
{profile, [
{key, atom, none},
{place, {tpl, example, point}, undefined},
{name, string, <<>>},
{list, [string], []},
{dict, [{string, string}], []}
]}.
{point, [
{x, <<"X">>, float, 0.0},
{y, <<"Y">>, integer, 2},
{z, <<"Z">>, bool, false}
]}.