Runtime: System.Text.Json - Change of namespace for JsonSerializer breaks code

Created on 26 Jul 2019  路  7Comments  路  Source: dotnet/runtime

Thank you for breaking a lot of in-flight code by moving the JsonSerializer class from System.Text.Json.Serialization to System.Text.Json ! Not only that, even methods have been renamed. JsonSerializer.Parse() -> JsonSerializer.Deserialize().

Guys.. DONT do such things! It breaks in-flight code, it messes up with people that even want to give .NET Core a try.

area-System.Text.Json

All 7 comments

In our case, code using the old namespace/methods was checked in by one developer, who then went away on vacation. Library was stable and didn't need any changes. Someone else took a dependency on that code after the API change and bam! shit hit the fan all across the organization. Every single dashboard went RED.

I mean, it is a preview after all; API changes can be made without prior notice.

@TheFanatr I don't disagree that it is a preview. But that does not mean you can rearrange things without any thought or notice.

Even with previews, people do write real-life applications. What did you expect -- people will write mere "hello world" apps and then join you for a kumabaya?

This wouldn't have happened in the "old days".. sigh.

When you use previews, you can expect such breaking changes and you should be prepared for it when updating runtime and/or sdk to another preview release.

MS has provided the Preview 7 release with a go-live license, which you can read as "you can use it in production and call us for support".

@JarnoNijboer We didn't manually update anything. That's the thing. We just opened the solution and the Visual Studio system auto-updated the SDK! BOTH (the update action and the API change) were unexpected and a painful experience to go through.

AFAIK updating VS is still a manual process, clicking the update button. The release notes of VS 16.3 preview release mentioned that the .net core 3.0 SDK is now included in the VS installer. The same as other .net core sdk's for 2.1 and 2.2 etc, these are also updated to latest versions when updating VS.

Thank you for the feedback.

The purpose of having previews is to get feedback and react to that feedback. For example, details from usability studies on System.Text.Json were outlined in https://github.com/dotnet/corefx/issues/39304, including feedback that led to these renames.

We appreciate your taking the time to try out the previews. While we strive to get things right the first time, we do need to be able to make changes when we don't, and we hope you will be able to easily react to such changes as they occur. If, however, any such churn is problematic for you, you can of course refrain from using previews and focus only on released versions.

Was this page helpful?
0 / 5 - 0 ratings