Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Sort subdocuments in arrays before comparing them #4

merged 1 commit into from

2 participants


It's just a little fix that was missing from the previous pull request.

@dieswaytoofast dieswaytoofast merged commit 355743e into dieswaytoofast:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 5, 2013
  1. @jcomellas
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  src/json.erl
2  src/json.erl
@@ -227,7 +227,7 @@ diff(_Path, [], []) ->
array_diff(Path, Pos, [Value1 | Tail1], [Value2 | Tail2]) when is_list(Value1); is_list(Value2) ->
%% We're dealing with subdocuments; recurse into them
- case diff([Pos | Path], Value1, Value2) of
+ case diff([Pos | Path], lists:sort(Value1), lists:sort(Value2)) of
match ->
%% Both elements match; check the next ones
array_diff(Path, Pos + 1, Tail1, Tail2);
Something went wrong with that request. Please try again.