Skip to content

Replace multi_json gem with standard Ruby json gem#25

Open
larouxn wants to merge 1 commit into
fog:masterfrom
larouxn:farewell_multi_json
Open

Replace multi_json gem with standard Ruby json gem#25
larouxn wants to merge 1 commit into
fog:masterfrom
larouxn:farewell_multi_json

Conversation

@larouxn

@larouxn larouxn commented Jun 19, 2026

Copy link
Copy Markdown

Description

Proposing we remove the multi_json gem with the standard Ruby json gem as it's now as fast or faster than other JSON gems in the majority of cases. Additionally allows us to simplify code quite a bit too. ✨

Related efforts

Implementation

The one quirk is apparently MultiJson.load (presumably through oj) could be passed almost anything (nil, '', IO, StringIO, etc.) and it would just return nil if it couldn't load it. JSON on the hand will error if you pass improper input. Thus, I added checks for nil, empty, and ensured if an IO or StringIO is passed it is read into a String before being passed to load.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant