Skip to content

fix(json): write booleans, guids, symbols and nested objects in additional data - #201

Open
Andrea Peruffo (andreaTP) wants to merge 2 commits into
microsoft:mainfrom
andreaTP:fix/json-any-value
Open

Andrea Peruffo (andreaTP) wants to merge 2 commits into
microsoft:mainfrom
andreaTP:fix/json-any-value

Conversation

@andreaTP

Copy link
Copy Markdown
Contributor

Additional data and untyped primitive collections now keep true, false, GUIDs, symbols, models and nested objects instead of dropping them or writing null, and an unsupported value raises as in the form writer.

@andreaTP
Andrea Peruffo (andreaTP) requested a review from a team as a code owner October 28, 2026 20:46
Copilot AI balanced review requested due to automatic review settings October 28, 2026 20:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Keyed Parsables in additional data lose primitive root values and serialize as empty objects, requiring a serialization fix and a regression test for primitive-backed wrappers.

1 open issue
What changed in this PR

This PR improves Kiota’s Ruby JSON writer so additional data and untyped primitive collections preserve supported values instead of dropping them or writing null.

Changes:

  • Adds explicit handling for booleans, GUIDs, symbols, hashes, and Parsable models.
  • Uses recursive conversion for collections and nested hashes, and raises on unsupported types.
  • Adds regression tests for additional data, collections, and root values.
File Description
components/​serialization/​json/​spec/​json_any_value_spec.rb Tests supported value types, nested structures, root values, and unsupported-type errors.
components/​serialization/​json/​lib/​microsoft_kiota_serialization_json/​json_serialization_writer.rb Updates type dispatch and recursive serialization for additional data and collections.

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 28, 2026 20:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are recorded for the JSON serialization changes.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

This branch has not been deployed

No deployments
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