Skip to content
This repository has been archived by the owner on Jan 12, 2023. It is now read-only.

Commit

Permalink
Merge pull request #16 from hcs42/field_fun_json_term
Browse files Browse the repository at this point in the history
(#15) Add "field_fun_json_term" field type
  • Loading branch information
jonasrichard committed Feb 19, 2015
2 parents 8be51d7 + fbeb9d0 commit f92b9f9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ejson.erl
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ apply_rule({field_fun, Name, {M, F}}, _Record, Value, Options) ->
apply_rule({rec_fun, Name, {M, F}}, Record, _Value, Options) ->
Value2 = erlang:apply(M, F, [Record]),
{Name, conv(Value2, Options)};
apply_rule({field_fun_json_term, Name, {M, F}}, _Record, Value, _Options) ->
Value2 = erlang:apply(M, F, [Value]),
{Name, Value2};
apply_rule({const, Name, Const}, _Record, _Value, Options) ->
{Name, conv(Const, Options)};
apply_rule(Name, _Record, Value, Options) ->
Expand Down

0 comments on commit f92b9f9

Please sign in to comment.