-
-
Notifications
You must be signed in to change notification settings - Fork 159
Dropping Dependence on Newtonsoft.Json
#276
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
Comments
Hi |
That is your call or course; Some points to consider;
We are only use it in the |
I like the idea of being able to drop the Newtonsoft.Json library. It is indeed a great product, and System.Text.Json may be a bit more complicated in spots, but System.Text.Json will always be there and supported. |
I did a quick tryout, and it seems System.Text.Json is missing a way to specify converter type for serialization of tems in collections. This isn't planned before .NET 8, so I will wait for the full support. |
That is odd… but this project only uses converters via attributes anyway…. just saying. |
Not sure what you mean. |
Hi. I had successfully reimplemented the two custom converter and decoracted the But hey, it’s your decision. BTW there was a security related bug with NewtonSoft just last month. |
I will take a look at the PR |
I have merged your PR. |
@vivet thank you for letting me know. |
Will just keep the issue open until released |
I did some testing, and mostly nothing works, so I have decided to rollback. |
@vivet I did some testing and did encounter some issues:
The Could not very the
And the SpeedLimits
And finally the But now all other tests are now passing .... |
Hi |
Sounds good. However, I think I would need to rebase and adjust according to the new language enum converter... I'll take a look at it later today. |
Any advance? |
Not really. I have been busy with other projects. |
I have merged the PR, and working on cosmetics refactoring and ensuring everything works. I expect release within 1-2 days |
@vivet @bobbyangers Great job guys! I think this is great that it is being taken on. All our 3rd party libraries have all been slowly moving over to it (ie: Airtable) – despite us not having taken it on in our own codebase yet. Will provide some inspiration for us to move to it when the opportunity comes up =) |
Ladies and Gentlemen, it's published I will close this issue. |
Using this
How to migrate from Newtonsoft.Json to System.Text.Json
If .NET core 3.1 should be the minimum supported framework version supported; It would be a great time to drop
Newtonsoft.Json
and useSystem.Text.Json
In the code, there is only a few things to consider;
HttpEngine<T, TR>
and in the two tests projects[JsonProperty]
everywhere camelcase is by convention[JsonProperty]
and replace with[System.Text.Json.JsonPropertyName]
where properties are not conventional, like when using dashes.StringBooleanConverter
Migrate toSystem.Text.Json
DateRestrictJsonConverter
Migrate toSystem.Text.Json
SortExpressionJsonConverter
Migrate toSystem.Text.Json
StringEnumOrDefaultConverter
Migrate toSystem.Text.Json
StringEnumListConverterTest
remove, convert to DayOfWeek ?The text was updated successfully, but these errors were encountered: