You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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, the System.Text.Json story doesn't seem to be fully fleshed out.
👋 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!
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: