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) ->
|
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
|
%% ensure the first jsx event we get is start_object or start_array when running
|
||||||
|
|
|
@ -51,7 +51,9 @@ is_json(JSON, Opts) ->
|
||||||
|
|
||||||
|
|
||||||
extract_parser_opts(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
|
%% enforce only arrays and objects at top level
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue