[FEAT]: Discriminated union support
Describe the need
There are quite a few types that are discriminated unions. See #178 for an example of one. Currently we sidestep the issue by deserializing to dynamic and letting the SDK consumer figure out what the actual type is.
Discriminated unions aren't likely to make it into C# in the near future^1 (and I'm not likely to rewrite this SDK in F#). The only viable alternative I see right now is OneOf. However, the System.Text.Json story doesn't seem to be fully fleshed out.
SDK Version
No response
API Version
No response
Relevant log output
No response
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
Another potential avenue: https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/polymorphism
👋 Hey Friends, this issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Please add the Status: Pinned label if you feel that this issue needs to remain open/active. Thank you for your contributions and help in keeping things tidy!