Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Replaced Newtonsoft.Json with System.Text.Json in projects. Plus minor misc fixes. #188

Merged
merged 1 commit into from
Jun 10, 2020

Conversation

pmaytak
Copy link
Contributor

@pmaytak pmaytak commented Jun 4, 2020

Replaced Newtonsoft.Json with System.Text.Json in projects (including samples). Plus minor spelling, warning fixes.

Note: Newtonsoft.Json by default does case-insensitive deserializaton, while System.Text.Json is case-sensitive by default to improve performance. In order to make it case-insensitive, we have to pass it options object to the deserializer.

Related resources:
Try the new System.Text.Json APIs
How to serialize and deserialize (marshal and unmarshal) JSON in .NET
How to migrate from Newtonsoft.Json to System.Text.Json

@pmaytak pmaytak requested review from jennyf19 and jmprieur June 4, 2020 22:34
@pmaytak pmaytak marked this pull request as ready for review June 4, 2020 22:34
Copy link
Collaborator

@jmprieur jmprieur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.
I'm just wondering why we need to change the samples.

Copy link
Collaborator

@jmprieur jmprieur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for clarifying Peter.
Next time there is an impact on a sample:

  • if this is due to the change to the product code. Fine.
  • however if this is a different work item (like here), please:
    • create a new GitHub issue to prioritize the work
    • propose a second PR

@pmaytak pmaytak force-pushed the pmaytak/removeNewtonsoft branch from 8edaaea to 9d96fb8 Compare June 10, 2020 23:23
@pmaytak pmaytak force-pushed the pmaytak/removeNewtonsoft branch from 9d96fb8 to 4806887 Compare June 10, 2020 23:28
@pmaytak pmaytak merged commit 27966a9 into master Jun 10, 2020
@pmaytak pmaytak deleted the pmaytak/removeNewtonsoft branch June 10, 2020 23:33
@pmaytak pmaytak linked an issue Jun 11, 2020 that may be closed by this pull request
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Manipulate JSON using System.Text instead of Newtonsoft
4 participants