Skip to content

Allow JSON 3 on newer Rubies - #429

Merged
tagliala merged 1 commit into
masterfrom
allow-json-3
Sep 8, 2026
Merged

tagliala merged 1 commit into
masterfrom
allow-json-3

Conversation

@tagliala

@tagliala tagliala commented Sep 8, 2026

Copy link
Copy Markdown
Member

Summary

  • remove the global JSON 2 development constraint now that multi_json 1.21.2 supports JSON 3 in its json_gem adapter
  • retain json < 3 in the Rails 7.0, 7.1, and 7.2 appraisals because those still test Ruby 3.0/3.1, while multi_json 1.21.2 requires Ruby 3.2
  • allow the default, Rails 8.0, Rails 8.1, and Rails edge bundles to resolve JSON 3

Oj compatibility

The Time serialization problem mentioned in the multi_json changelog is tracked upstream as ohler55/oj#1104. A proposed fix exists in ohler55/oj#1106, but it is not yet merged or released.

This does not affect ChronoModel: Oj is neither a dependency nor configured by this project, multi_json 1.21.2 prefers the JSON gem during automatic adapter selection, and ChronoModel uses MultiJson only for PostgreSQL view metadata composed of ordinary JSON primitives rather than Time values. Local verification selected MultiJSON::Adapters::JsonGem; Oj was not installed.

Verification

  • bundle exec rubocop
  • bundle exec rake with Rails 8.1, multi_json 1.21.2, and JSON 3.0.1: 509 examples, 0 failures
  • BUNDLE_GEMFILE=/Users/geremia/dev/ifad/chronomodel/gemfiles/rails_8.0.gemfile bundle exec rake with JSON 3.0.1: 509 examples, 0 failures
  • DDL metadata round trip through MultiJSON::Adapters::JsonGem with JSON 3.0.1
  • fresh Ruby 3.1/Rails 7.1 resolution selects JSON 2.21.2 and multi_json 1.19.1, preserving the compatible legacy pair

Remove the global JSON 2 constraint now that multi_json 1.21.2
supports JSON 3. Keep the constraint in Rails 7 appraisals because
those still test Ruby 3.0 and 3.1, while multi_json 1.21.2 requires
Ruby 3.2.
@tagliala
tagliala merged commit 1599ef6 into master Sep 8, 2026
31 checks passed
@tagliala
tagliala deleted the allow-json-3 branch September 8, 2026 12:12
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