I'm working with hash like this, the first key is a hash
hash = { { a: 'a', b: 'b' } => { c: { d: 'd', e: 'e' } } }
when I convert it to json, I get this:
data_json = hash.to_json
# => "{\"{:a=\\u003e\\\"a\\\", :b=\\u003e\\\"b\\\"}\":{\"c\":{\"d\":\"d\",\"e\":\"e\"}}}"
But when I parse the data, the first key is not parsed:
JSON.parse data_json
# => {"{:a=>\"a\", :b=>\"b\"}"=>{"c"=>{"d"=>"d", "e"=>"e"}}}
Why JSON.parse acts like that? and How can I fix it ?