fix(serialization-json): serialize nested arrays recursively - #730
Merged
Vincent Biret (baywet) merged 2 commits intoSep 11, 2026
Merged
Vincent Biret (baywet) merged 2 commits into
Vincent Biret (baywet) merged 2 commits into
Conversation
Vincent Biret (baywet)
requested changes
Sep 11, 2026
Vincent Biret (baywet)
left a comment
Member
There was a problem hiding this comment.
Thanks for the contribution!
Vincent Biret (baywet)
approved these changes
Sep 11, 2026
Vincent Biret (baywet)
left a comment
Member
There was a problem hiding this comment.
Thank you for making the changes!
There was a problem hiding this comment.
🟢 Approval recommended
Validation passed and no blocking issues remain.
Pull request overview
Fixes JSON serialization for recursively nested lists while preserving existing validation behavior.
Changes:
- Adds recursive nested-list dispatch.
- Adds regression tests for supported and rejected collection types.
File summaries
| File | Summary |
|---|---|
packages/serialization/json/tests/unit/test_json_serialization_writer.py |
Adds nested-list regression and rejection tests. |
packages/serialization/json/kiota_serialization_json/json_serialization_writer.py |
Supports recursive nested-list serialization. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Vincent Biret (baywet)
force-pushed
the
codex/serialize-nested-json-arrays
branch
from
September 11, 2026 17:46
326ebc5 to
ccbe1dd
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



write_any_value("matrix", [[1, 2, 3]])raisesTypeErrorbecause the list dispatcher has no branch for nested lists.Add an explicit
all(isinstance(x, list) for x in value)branch, consistent with the neighboring dictionary check, and delegate to the existing recursive element writer. Keep the existing unknown-collection exception and specialized collection paths. This supports nested lists without accepting previously unsupported mixtures of lists and scalar/model/dictionary values at the same level.Validation (Python 3.12):
TypeError.pytest -q— 120 passed.git diff --checkpassed.suggestion-modeconfiguration option.Closes #478.
Prepared with AI assistance; reproduction and validation ran locally.