Skip to content

Allow duplicate keys in JSON parser#185

Merged
kenhys merged 1 commit into
fluent:mainfrom
Watson1978:allow_duplicate_key
Jul 2, 2026
Merged

Allow duplicate keys in JSON parser#185
kenhys merged 1 commit into
fluent:mainfrom
Watson1978:allow_duplicate_key

Conversation

@Watson1978

Copy link
Copy Markdown
Contributor

The json gem emits a deprecation warning for duplicate keys in JSON objects and will raise JSON::ParserError in json 3.0 unless allow_duplicate_key: true is specified.

The plugin has historically accepted duplicate keys silently (last value wins). To preserve this behavior uniformly regardless of the json gem version, this passes allow_duplicate_key: true to JSON.parse.

The json gem emits a deprecation warning for duplicate keys in JSON objects and will raise `JSON::ParserError` in json 3.0 unless `allow_duplicate_key: true` is specified.

The plugin has historically accepted duplicate keys silently (last value wins).
To preserve this behavior uniformly regardless of the json gem version, this passes `allow_duplicate_key: true` to `JSON.parse`.

Signed-off-by: Shizuo Fujita <fujita@clear-code.com>
@Watson1978 Watson1978 requested a review from kenhys July 2, 2026 09:42
@kenhys kenhys merged commit 62daa74 into fluent:main Jul 2, 2026
21 checks passed
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