-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Change Json.NET to System.Text.Json #3758
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
1bcc5a5
Change Json.NET to System.Text.Json
tdykstra 4630528
move serializer advice to remarks
tdykstra 01bfb71
fix indentation
tdykstra eab8044
fix typo
tdykstra 5a47156
fix link
tdykstra 5768f70
4.6.1 --> 4.7.2
tdykstra 5a1d082
include use s.t.j/newtonsoft advice in summary
tdykstra 7324933
fix typo
tdykstra 4350324
Update xml/System.Web.Script.Serialization/JavaScriptSerializer.xml
tdykstra File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this statement true ONLY for .NET Framework 4.6.1 or later?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I recall switching from
JavaScriptSerializer
to JSON.NET years ago for performance reasons. At one point, there was messaging from Microsoft that completely discouraged the use ofJavaScriptSerializer
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ahsonkhan In this doc should we say use Newtonsoft.json for earlier than 4.6.1 and System.Text.Json for 4.6.1 and later?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@layomia @jozkee @steveharter can you please help answer this question?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@steveharter @layomia @jozkee ping. What is the correct sentence to use here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes,
System.Text.Json
targetsnetstandard2.0
which makes it compatible only with .NET Framework 4.6.1 or later.That seems to be the most accurate. Why is that advice on the summary and not as a warning in the
JavaScriptSerializer
page?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No way to know why it's there or who put it there -- it's already there in the earliest commit in the repo.
I agree it's out of place where it is, I'll move it to Remarks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we only have it in remarks, it won't show up in IntelliSense for folks using IDEs like VS. We may want to keep the note in the summary as well as the remarks.