Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Prefer JSON's symbolize_names option instead of ActiveSupport's deep_symbolize_keys #372

New issue

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

Open
viralpraxis wants to merge 1 commit into rubocop:master
base: master
Choose a base branch
Loading
from viralpraxis:prefer-symbolize-names-over-chained-deep-symbolize-keys

Conversation

@viralpraxis
Copy link

@viralpraxis viralpraxis commented Oct 11, 2025

@viralpraxis viralpraxis changed the title (削除) Prefer JSON's symbolize_names option instead of ActiveSupport's dep_symbolize_keys (削除ここまで) (追記) Prefer JSON's symbolize_names option instead of ActiveSupport's deep_symbolize_keys (追記ここまで) Oct 11, 2025
Copy link
Member

pirj commented Oct 11, 2025

If it’s such a problem, I wonder if AS can somehow mark a freshly parsed object, and issue a warning if deep symbolise is called on it?

Copy link
Member

pirj commented Oct 11, 2025

Cc @byroot

Copy link

byroot commented Oct 11, 2025

If it’s such a problem

It's wasteful, but not necessarily a problem.

I wonder if AS can somehow mark a freshly parsed object

Nah, would mean monkey patching JSON, to then add an instance variable on a Hash object, that's too wasteful and dirty.

pirj reacted with heart emoji

Copy link
Author

So does it make sense to implement this rule as a cop?

Copy link
Member

pirj commented Oct 18, 2025

As a cop - certainly yes. As a guideline - I’m uncertain if it’s worth it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /