Merge pull request #4009 from PMunch/json-objecthashing-fix
Changed the JSON object hashing procedure (fixing #3972)
This commit is contained in:
commit
3b732259c0
1 changed files with 1 additions and 1 deletions
|
|
@ -787,7 +787,7 @@ proc hash*(n: JsonNode): Hash =
|
||||||
|
|
||||||
proc hash*(n: Table[string, JsonNode]): Hash =
|
proc hash*(n: Table[string, JsonNode]): Hash =
|
||||||
for key, val in n:
|
for key, val in n:
|
||||||
result = result !& hash(key) !& hash(val)
|
result = result xor (hash(key) !& hash(val))
|
||||||
result = !$result
|
result = !$result
|
||||||
|
|
||||||
proc len*(n: JsonNode): int =
|
proc len*(n: JsonNode): int =
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue