The issue with using JSON stringify for the Ruby hashes is that Ruby expects the keys to be unquoted and JSON.stringify returns the keys quoted.