was using three different methods to rewrite options to core parser options, switched to just one
This commit is contained in:
parent
c1e58460e4
commit
1a20e911a9
2 changed files with 7 additions and 3 deletions
|
@ -69,7 +69,9 @@ term_to_json(List, Opts) ->
|
|||
|
||||
|
||||
extract_parser_opts(Opts) ->
|
||||
[ {K, V} || {K, V} <- Opts, lists:member(K, [comments, encoding]) ].
|
||||
[ {K, V} || {K, V} <-
|
||||
Opts, lists:member(K, [comments, encoding, unquoted_keys])
|
||||
].
|
||||
|
||||
|
||||
%% ensure the first jsx event we get is start_object or start_array when running
|
||||
|
|
|
@ -51,8 +51,10 @@ is_json(JSON, Opts) ->
|
|||
|
||||
|
||||
extract_parser_opts(Opts) ->
|
||||
[ {K, V} || {K, V} <- Opts, lists:member(K, [comments, encoding]) ].
|
||||
|
||||
[ {K, V} || {K, V} <-
|
||||
Opts, lists:member(K, [comments, encoding, unquoted_keys])
|
||||
].
|
||||
|
||||
|
||||
%% enforce only arrays and objects at top level
|
||||
collect_strict({event, start_object, Next}, Keys) ->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue