remove clean_string/1

This commit is contained in:
alisdair sullivan 2012-03-25 18:49:24 -07:00
parent 02489dc752
commit f6e1e75163

View file

@ -23,7 +23,7 @@
-module(jsx_encoder).
-export([encoder/3, clean_string/1]).
-export([encoder/3]).
-spec encoder(Handler::module(), State::any(), Opts::jsx:opts()) -> jsx:encoder().
@ -103,8 +103,6 @@ fix_key(Key) when is_atom(Key) -> fix_key(atom_to_binary(Key, utf8));
fix_key(Key) when is_binary(Key) -> Key.
clean_string(Bin) -> clean_string(Bin, <<>>, #opts{json_escape=true}).
clean_string(<<$\", Rest/binary>>, Acc, Opts=#opts{json_escape=true}) ->
clean_string(Rest, <<Acc/binary, $\\, $\">>, Opts);
clean_string(<<$\\, Rest/binary>>, Acc, Opts=#opts{json_escape=true}) ->