What’s wrong with the JSON gem API? | byroot’s blog
08-Aug-2025 94
As I mentioned at the start of my Optimizing Ruby’s JSON series of posts, performance isn’t why I candidated to be the new gem’s maintainer.
The actual reason is that the gem has many APIs that I think aren’t very good, and some that are outright dangerous.
As a gem user, it’s easy to be annoyed at deprecations and breaking changes. It’s noisy and creates extra work, so I entirely understand that people may suffer from deprecation fatigue. But while it occasionally happens to run into mostly cosmetic deprecations that aren’t really worth the churn they cause (and that annoys me a lot too), most of the time there’s a good reason for them, it just is very rarely conveyed to the users, and even more rarely discussed, so let’s do that for once.
So I’d like to go over some of the API changes and deprecations I already implemented or will likely implement soon, given it’s a good occasion to explain why the change is valuable, and to talk about API design more broadly.
What’s wrong with the JSON gem API? | byroot’s blog #ruby #rubydeveloper #rubyonrails #What’s #wrong #byroot’s #api? #blog #gem https://www.rubyonrails.ba/link/what-s-wrong-with-the-json-gem-api-byroot-s-blog