jonasrichard/ejson

Don't post-process result of field_fun

Closed this issue · 1 comments

field_fun_json_term should not call conv (or encode) recursively. field_fun will call conversion recursively instead.

Since I introduced field opt list I imagine this:

-json({person, {field_fun, "complexData", EncFun, DecFun, [raw]}}).

raw means that the result won't be converted. But how should this work in case of decoding? The DecFun decoding function will get an jsx attr list and it needs to create a valid Erlang term (so the decoding work should be implemented there).