Skip to content

Backport(v1.19): support json gem v3.x (#5492) - #5493

Merged
kenhys merged 1 commit into
v1.19from
backport-pr5492
Sep 10, 2026
Merged

Backport(v1.19): support json gem v3.x (#5492)#5493
kenhys merged 1 commit into
v1.19from
backport-pr5492

Conversation

@Watson1978

Copy link
Copy Markdown
Contributor

Which issue(s) this PR fixes:
Backport #5492
Fixes #

What this PR does / why we need it:
json 3.0 dropped the positional options argument from JSON.parse, so every call passing Fluent::DEFAULT_JSON_PARSE_OPTIONS now fails with ArgumentError: wrong number of arguments (given 2, expected 1). Ref. https://github.com/fluent/fluentd/actions/runs/34311091836

Pass the options as keyword arguments instead.

Docs Changes:
N/A

Release Note:

  • Support json gem v3.x

**Which issue(s) this PR fixes**:
Fixes #

**What this PR does / why we need it**:
json 3.0 dropped the positional options argument from `JSON.parse`, so
every call passing `Fluent::DEFAULT_JSON_PARSE_OPTIONS` now fails with
`ArgumentError: wrong number of arguments (given 2, expected 1)`.
Ref. https://github.com/fluent/fluentd/actions/runs/34311091836

Pass the options as keyword arguments instead.

**Docs Changes**:
N/A

**Release Note**:
* Support json gem v3.x

Signed-off-by: Shizuo Fujita <fujita@clear-code.com>
@Watson1978 Watson1978 added this to the v1.19.4 milestone Sep 9, 2026
Comment thread lib/fluent/config/types.rb Dismissed
Comment thread lib/fluent/config/types.rb Dismissed
@Watson1978
Watson1978 requested a review from kenhys September 9, 2026 09:54
@kenhys

kenhys commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

nitpick: fluent-package v6 will not ship json 3.x currently, but "install from source" might be affected. so backport it to v1.19.

@kenhys
kenhys merged commit 0ec4801 into v1.19 Sep 10, 2026
22 checks passed
@kenhys
kenhys deleted the backport-pr5492 branch September 10, 2026 01:26
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.

3 participants