Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix implementation of http://code.google.com/p/mochiweb/issues/detail…

  • Loading branch information...
commit baa97a7e41cd242138bb52ba427a9db9ec23b79b 1 parent 943ff0d
@etrepum etrepum authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/mochijson2.erl
View
4 src/mochijson2.erl
@@ -101,7 +101,9 @@ json_encode(F, _State) when is_float(F) ->
mochinum:digits(F);
json_encode(S, State) when is_binary(S); is_atom(S) ->
json_encode_string(S, State);
-json_encode([{_,_}|_] = Props, State) ->
+json_encode([{K, _}|_] = Props, State) when (K =/= struct andalso
+ K =/= array andalso
+ K =/= json) ->
json_encode_proplist(Props, State);
json_encode({struct, Props}, State) when is_list(Props) ->
json_encode_proplist(Props, State);
Please sign in to comment.
Something went wrong with that request. Please try again.