[FEAT]: Discriminated union support #278
Labels
Status: Needs info
Full requirements are not yet known, so implementation should not be started
Type: Feature
New feature or request
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 future1 (and I'm not likely to rewrite this SDK in F#). The only viable alternative I see right now is
OneOf
. However, theSystem.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
Footnotes
https://github.com/dotnet/csharplang/issues/113 ↩
The text was updated successfully, but these errors were encountered: