Permalink
Browse files

Convert nested #{} to JSON's [] instead of {}

This ensures that we retain JSON equivalency after JSON->Erlson->JSON
conversion.
  • Loading branch information...
1 parent 6d56d16 commit daf19e3cee58e63036f7bfa2a438328cb72304a0 @alavrik committed Jul 11, 2011
Showing with 1 addition and 0 deletions.
  1. +1 −0 src/erlson.erl
View
@@ -200,6 +200,7 @@ encode_json_term(X) when
is_integer(X); is_float(X); % JSON number
is_boolean(X) -> % JSON true | false
X;
+encode_json_term([]) -> [];
encode_json_term(L) when is_list(L) ->
% try to treat list as a nested dictionary
try to_json_struct(L)

0 comments on commit daf19e3

Please sign in to comment.