Permalink
Browse files

Fix bug in JSON generation

  • Loading branch information...
1 parent 83ef882 commit d8b2af63cf760f8df1cccae8b1579392a72fbfa6 @evanmiller evanmiller committed Mar 29, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/boss/boss_json.erl
@@ -31,7 +31,7 @@ json_data1([{VariableName, [First|_] = Variable}|Rest], ModelList, Acc) when is_
false ->
json_data1(Rest, ModelList, [{VariableName, json_data1(Variable, ModelList, [])}|Acc])
end;
-json_data1([{VariableName, [First|_] = Variable}|Rest], ModelList, Acc) when is_list(First) ->
+json_data1([{VariableName, [[{_, _}|_]|_] = Variable}|Rest], ModelList, Acc) ->
json_data1(Rest, ModelList, [{VariableName, lists:map(fun(Item) ->
json_data1(Item, ModelList, [])
end, Variable)}|Acc]);

0 comments on commit d8b2af6

Please sign in to comment.