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
Since the StreamingContext type is Obsolete in .NET 8, is there a future plan for supporting a serialization context in the future?
StreamingContext was used in the BinaryFormatter infrastructure, which is going away, although Newtonsoft.Json uses this type for non-BinaryFormatter purposes.
The current workaround is to suppress the warning when using the JsonSerializer.Context property (when newing up StreamingContext actually), but it's not ideal.
If I read the BinaryFormatter obsoletion roadmap correctly, the type will not be removed in future versions (hopefully), so it might not be completely blocking given the workaround, but it's still worth some consideration.
The text was updated successfully, but these errors were encountered:
EDIT: Oh, never mind, my apologies. Ignore my comment please, i didn't notice you're a Microsoft guy...
> is there a future plan for supporting a serialization context in the future?
In my opinion, since quite a while already Newtonsoft.Json is basically a legacy library in maintenance mode, with System.Text.Json being the modern .NET json serializer that is in active development and part of the .NET BCL. Don't get you hopes up for Newtonsoft.Json receiving any noteworthy new features. If you need to maintain Newtonsoft.Json in an existing project, the workaround is (and quite likely will remain in the future) suppression of the SYSLIB0050 obsoletion warning for the StreamingContext ctor's.
Thanks @elgonzo , I think your opinion is valid, as I expected this too as a way to mark this issue as by design, if we believe we won't be blocked by it in the future.
I do work at Microsoft, but I'm not in the .NET team, so for this issue I'm just a random consumer of the library.
Since the
StreamingContext
type is Obsolete in .NET 8, is there a future plan for supporting a serialization context in the future?StreamingContext was used in the
BinaryFormatter
infrastructure, which is going away, although Newtonsoft.Json uses this type for non-BinaryFormatter purposes.The current workaround is to suppress the warning when using the JsonSerializer.Context property (when newing up
StreamingContext
actually), but it's not ideal.If I read the BinaryFormatter obsoletion roadmap correctly, the type will not be removed in future versions (hopefully), so it might not be completely blocking given the workaround, but it's still worth some consideration.
The text was updated successfully, but these errors were encountered: