encoder now only performs a single pass on strings and can optionally json encode them
This commit is contained in:
parent
821a8ac06e
commit
5bc8bfdf45
4 changed files with 70 additions and 62 deletions
|
@ -49,6 +49,8 @@ parse_opts([no_jsonp_escapes|Rest], Opts) ->
|
|||
parse_opts(Rest, Opts#opts{no_jsonp_escapes=true});
|
||||
parse_opts([comments|Rest], Opts) ->
|
||||
parse_opts(Rest, Opts#opts{comments=true});
|
||||
parse_opts([json_escape|Rest], Opts) ->
|
||||
parse_opts(Rest, Opts#opts{json_escape=true});
|
||||
parse_opts(_, _) ->
|
||||
{error, badarg}.
|
||||
|
||||
|
@ -60,7 +62,8 @@ valid_flags() ->
|
|||
explicit_end,
|
||||
single_quotes,
|
||||
no_jsonp_escapes,
|
||||
comments
|
||||
comments,
|
||||
json_escape
|
||||
].
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue