Skip to content

Instantly share code, notes, and snippets.

@zkessin
Created November 5, 2014 09:17
Show Gist options
  • Save zkessin/7918f89f622f8dde939e to your computer and use it in GitHub Desktop.
Save zkessin/7918f89f622f8dde939e to your computer and use it in GitHub Desktop.
-define(GET(Field),
{Field, list_to_binary(wf:q(Field))}).
-define(GET_JSON(JSON_TERM),
fun(Field) when is_atom(Field) ->
FieldB = erlang:atom_to_binary(Field,utf8),
Val = proplists:get_value(FieldB, JSON_TERM),
{Field, Val}
end).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment