JSON IO fix for null - #2056
Open
AndreiKingsley wants to merge 3 commits into
Open
Conversation
AndreiKingsley
commented
Sep 2, 2026
|
|
||
| // A missing or `null` json array is read as `null`, so read it as an empty list | ||
| // when the schema requires the list to be non-nullable. | ||
| convertIf({ fromType, toSchema -> |
Collaborator
Author
There was a problem hiding this comment.
@Jolanrensen with a new null json handling logic, openapi tests fails for schemas with non-nullalble List<T> type (that contains null that was parsed to empty lists with the old logic). Not sure wthether it's a problem from the current openapi schemas generation logic — maybe we need to align it with new null logic; this is the workaround suggested by AI. Please take a look to see if it is correct.
AndreiKingsley
marked this pull request as ready for review
September 2, 2026 11:22
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.
Fixes #2035
Fixes #2045
Fixes #2046
Fixes #2048
Now we parse
nullarrays as actuallynulls, not empty lists.Align with
nullwriting as well.See test updated tests for better understanding of new behavior.
But! There is still a kind of weird behavior:
results into
due to our read implementation and
array/valuelimitation. We need to completely rewrite it to prevent such data loss.But I think this is totally acceptable at the moment — it’s an extremely rare occurrence, so I’ve documented it just in case