ngocnicholas / airtable.net

Airtable .NET API Client
MIT License
138 stars 34 forks source link

Change Newtonsoft to System.Text.Json #40

Closed Phalanx123 closed 2 years ago

Phalanx123 commented 3 years ago

Possibly change Newtonsoft usage to System.Text.Json to reduce reliance on third-party libraries?

ngocnicholas commented 3 years ago

Will look into it. Thanks.

Faeldor commented 3 years ago

I'd avoid this if you're doing anything more than using Newtonsoft to deserialize. System.Text.Json only support reading Json at this time. For consistency sake I would stick with Newtonsoft until System.Text.Json catches up.

ngocnicholas commented 2 years ago

Microsoft is constantly improving System.Text.Json and there has been significant improvements between .Net Core 3.1 and .Net 5.0 and Microsoft has already started planning for .Net 6.0. With the info above in mind, I'm planning to do the migration in the new release of Airtable.net.

chris-ux commented 2 years ago

Interested in this due to DateOnly and TimeOnly.

Newtonsoft.Json.JsonSerializationException: Error converting value to type System.DateOnly

PR #47

ngocnicholas commented 2 years ago

Replaced Newtonsoft.json with System.Text.Json 6.0.2.

mabead commented 1 year ago

FYI: I tried to upgrade from 1.1.5 to 1.3 but the result does not work because my enum values can't be converted properly by System.Text.Json because this library does not use the EnumMember attribute. See https://github.com/dotnet/runtime/issues/74385 for more details.

I will therefore have to stay with 1.1.5 because of this change of dependency in the AirTable nuget 😢