No title Revision 313531383336 (Wed Mar 16 2011 at 21:44) - Diff Link to this snippet: https://friendpaste.com/7DRPbUVVLH3AWxKIsUOx84 Embed: manni perldoc borland colorful default murphy trac fruity autumn bw emacs pastie friendly Show line numbers Wrap lines 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354diff --git a/src/mochiweb/mochijson2.erl b/src/mochiweb/mochijson2.erlindex bdf6d77..c1c2be6 100644--- a/src/mochiweb/mochijson2.erl+++ b/src/mochiweb/mochijson2.erl@@ -172,28 +172,31 @@ json_encode_proplist(Props, State) -> json_encode_string(A, State) when is_atom(A) -> L = atom_to_list(A),- case json_string_is_safe(L) of- true ->- [?Q, L, ?Q];- false ->- json_encode_string_unicode(xmerl_ucs:from_utf8(L), State, [?Q])- end;+ [?Q, L, ?Q];+ %% case json_string_is_safe(L) of+ %% true ->+ %% [?Q, L, ?Q];+ %% false ->+ %% json_encode_string_unicode(xmerl_ucs:from_utf8(L), State, [?Q])+ %% end; json_encode_string(B, State) when is_binary(B) ->- case json_bin_is_safe(B) of- true ->- [?Q, B, ?Q];- false ->- json_encode_string_unicode(xmerl_ucs:from_utf8(B), State, [?Q])- end;+ [?Q, B, ?Q];+ %% case json_bin_is_safe(B) of+ %% true ->+ %% [?Q, B, ?Q];+ %% false ->+ %% json_encode_string_unicode(xmerl_ucs:from_utf8(B), State, [?Q])+ %% end; json_encode_string(I, _State) when is_integer(I) -> [?Q, integer_to_list(I), ?Q]; json_encode_string(L, State) when is_list(L) ->- case json_string_is_safe(L) of- true ->- [?Q, L, ?Q];- false ->- json_encode_string_unicode(L, State, [?Q])- end.+ [?Q, L, ?Q].+ %% case json_string_is_safe(L) of+ %% true ->+ %% [?Q, L, ?Q];+ %% false ->+ %% json_encode_string_unicode(L, State, [?Q])+ %% end. json_string_is_safe([]) -> true;