The hash generated in Elixir does not match the Javascript hash

A very important thing to keep in mind is JSON key order. Neither the JSON spec nor the Elixir maps you generally encode to JSON have any guaranteed key order, so when you write it out to a string you may get different actual strings before the encoding. That may not matter for you use case but it’s a common issue if you expect strict equality with larger or more complex JSON strings.

4 Likes