was using three different methods to rewrite options to core parser options, switched to just one

This commit is contained in:
alisdair sullivan 2010-09-23 22:22:47 -07:00
parent c1e58460e4
commit 1a20e911a9
2 changed files with 7 additions and 3 deletions

View file

@ -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

View file

@ -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