We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
symbolize_keys and stringify_keys does not work on nested hashes:
> {"this"=>{"is"=>:an, "awful"=>:example}, "very"=>:weird}.symbolize_keys => {:this=>{"is"=>:an, "awful"=>:example}, :very=>:weird}
and: > {:this => {:is => :an , :awful => :example}, :very => :weird}.stringify_keys => {"this"=>{:is=>:an, :awful=>:example}, "very"=>:weird}
The text was updated successfully, but these errors were encountered:
Should they do this? Does ActiveSupport/Rails do this?
Sorry, something went wrong.
Nope, I don't think it should work on nested hashes. Also, {stringify/symbolize}_keys is a code smell.. vote to close this issue.
{stringify/symbolize}_keys
@tilo can you explain your use case a bit more? Did you know JSON and MsgPack have options to load with symbol keys?
No branches or pull requests
symbolize_keys and stringify_keys does not work on nested hashes:
and:
> {:this => {:is => :an , :awful => :example}, :very => :weird}.stringify_keys
=> {"this"=>{:is=>:an, :awful=>:example}, "very"=>:weird}
The text was updated successfully, but these errors were encountered: