Merge pull request #4009 from PMunch/json-objecthashing-fix

Changed the JSON object hashing procedure (fixing #3972)
This commit is contained in:
Andreas Rumpf
2016-03-29 21:55:49 +02:00

View File

@@ -787,7 +787,7 @@ proc hash*(n: JsonNode): Hash =
proc hash*(n: Table[string, JsonNode]): Hash =
for key, val in n:
result = result !& hash(key) !& hash(val)
result = result xor (hash(key) !& hash(val))
result = !$result
proc len*(n: JsonNode): int =