I accidentally saved a Ruby hash for a string in Ruby 1.9 by calling my_hash.to_s , which is equal to my_hash.inspect . This gave me a line like this:
'{"foo"=>{"bar"=>"baz", "qux"=>"quux"}'
Now I want to return this back to the hash. How it's done?
I am not looking for an explanation on other serialization methods, I know them. I just need a way to get this back so that I can keep it in the right direction.
Cristiano betta
source share