fix ordering problem for pre_encode
This commit is contained in:
parent
18bc21d838
commit
6bf3ff67e8
1 changed files with 4 additions and 3 deletions
|
@ -82,12 +82,13 @@ list_or_object([Term|Rest], {Handler, State}, Opts) ->
|
||||||
|
|
||||||
|
|
||||||
object([{Key, Value}, Next|Rest], {Handler, State}, Opts) when is_atom(Key); is_binary(Key) ->
|
object([{Key, Value}, Next|Rest], {Handler, State}, Opts) when is_atom(Key); is_binary(Key) ->
|
||||||
|
V = pre_encode(Value, Opts),
|
||||||
object(
|
object(
|
||||||
[pre_encode(Next, Opts)|Rest],
|
[pre_encode(Next, Opts)|Rest],
|
||||||
{
|
{
|
||||||
Handler,
|
Handler,
|
||||||
value(
|
value(
|
||||||
pre_encode(Value, Opts),
|
V,
|
||||||
{Handler, Handler:handle_event({key, clean_string(fix_key(Key), Opts)}, State)},
|
{Handler, Handler:handle_event({key, clean_string(fix_key(Key), Opts)}, State)},
|
||||||
Opts
|
Opts
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue