Update protocol tests and handle null values in sparse map serialization#10177
Update protocol tests and handle null values in sparse map serialization#10177AndrewAsseily wants to merge 4 commits intov2from
Conversation
ashovlin
left a comment
There was a problem hiding this comment.
- Can you add a changelog entry?
- I see only the JSON and CBOR serializers are updated - do the rest handle nulls already?
- Preferably in
protocol-tests-ignore-list.json, but at least in the PR description - can you write why we're skipping each new skipped case? Do we want to preserve backwards compatibility, or do we have bugs that we're not addressing yet?
The other serializers don't handle nulls, they'd crash the same way. The original sparse work (PR #10110) only targeted parsing, not serialization. This PR adds null handling to the JSON and CBOR serializers because those are the only protocols with sparse test cases. I checked the service models and the only service with the sparse trait today is connectcases, which uses REST-JSON That said, services could add sparse at any time, so it might be worth adding to the remaining serializers in this PR to be safe. Let me know what you think.
|
Description of changes:
PR #10110 added null handling for lists but not maps. This PR extends the same pattern to maps. Also fixes the CBOR map parser which was silently dropping null values instead of preserving them.
Also updates protocol tests to the latest.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.