Skip to content

AVRO-4271: [ruby] Use json instead of multi_json - #3825

Open
ericproulx wants to merge 2 commits into
apache:mainfrom
ericproulx:ruby-use-json-gem
Open

ericproulx wants to merge 2 commits into
apache:mainfrom
ericproulx:ruby-use-json-gem

Conversation

@ericproulx

@ericproulx ericproulx commented Jun 19, 2026 •

Copy link
Copy Markdown

What is the purpose of the change

This resolves AVRO-4271 by switching the Ruby runtime dependency from
multi_json to the json gem and updating Ruby JSON parsing/generation calls
to use JSON directly. It also removes the stale Yajl.dump call in protocol
message serialization.

The parsing calls do not pass the obsolete quirks_mode option or an explicit
create_additions: false, because quirks_mode has not been needed since
json 2.0 and JSON.parse disables additions by default.

This also adds bigdecimal as an explicit dependency because it is no longer a
default gem as of Ruby 3.4.

Verifying this change

This change is already covered by existing tests. The following targeted tests
were run locally:

  • ruby -Ilib:test test/test_schema.rb
  • ruby -Ilib:test test/test_schema_normalization.rb
  • ruby -Ilib:test test/test_protocol.rb
  • ruby -Ilib:test test/test_datafile.rb --name test_differing_schemas_with_complex_objects
  • ruby -Ilib:test test/test_io.rb --name '/test_(null|boolean|string|bytes|int|long|float|double)/'

Documentation

  • Does this pull request introduce a new feature? no
  • If yes, how is the feature documented? not applicable

@github-actions github-actions Bot added the Ruby label Jun 19, 2026
Comment thread lang/ruby/lib/avro/protocol.rb Outdated
Assisted-By: devx/63fca10e-e960-41ef-b93a-054c5b25df5f
…s: false`. The latter is the default value when calling `parse`.

Also, added `bigdecimal` as a dependency since it's not part of default gems since Ruby 3.4.0.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants