Skip to content

Replace multi_json gem with standard Ruby json gem - #25

Merged
geemus merged 1 commit into
fog:masterfrom
larouxn:farewell_multi_json
Jul 1, 2026
Merged

geemus merged 1 commit into
fog:masterfrom
larouxn:farewell_multi_json

Conversation

@larouxn

@larouxn larouxn commented Jun 19, 2026 •

Copy link
Copy Markdown
Contributor

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.

@geemus

geemus commented Jul 1, 2026

Copy link
Copy Markdown
Member

@larouxn Sorry for my delay. This sounds good to me. Thank you for the context and details.

@geemus
geemus merged commit 45c1477 into fog:master Jul 1, 2026
4 checks passed
@geemus

geemus commented Jul 1, 2026

Copy link
Copy Markdown
Member

released in v1.4.0

@larouxn
larouxn deleted the farewell_multi_json branch July 2, 2026 07:18
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.

2 participants