twilio / twilio-csharp

Twilio C#/.NET Helper Library for .NET6+.
MIT License
674 stars 302 forks source link

Target .net 6.0 (and later), removing newtonsoft dependency #630

Open waynebrantley opened 2 years ago

waynebrantley commented 2 years ago

Issue Summary

Any chance on getting the library updated past netstandard 2.0. By targeting net6.0 and later, you can use system.text.json and not need newtonsoft. You can still create a netstandard 2.0 release with newtonsoft.

rakatyal commented 2 years ago

Hi @waynebrantley! Thanks for reporting the issue. This is on our radar. Pull requests and +1s on the issue summary will help it move up the backlog.

waynebrantley commented 2 years ago

@rakatyal there are 12 prs now and concerned that large changes like this will not be merged if a PR is created. Can you assure that PRs with changes that are needed like this will not just sit as a PR with no one touching?

waynebrantley commented 1 year ago

@rakatyal Any update? As a developer centric product (Twilio really, really relies on developers to help them grow) - this library should be brought up to date and target at least net6 and remove these dependencies. In addition, I think you should really engage and handle all these now 15 prs as they just age out. No community member is going to do this - because the PR will just sit there.

This problem appears to be a problem across Twilio. https://github.com/twilio/twilio-voice.js/issues/55

waynebrantley commented 1 year ago

@Swimburger @AsabuHere @rakatyal Any update. Need to use System.Text.Json. Additional targets for dotnet 6,7,8 etc would be nice too. Developers are your bread and butter. Without them - twilio would cease to exist. You really should embrace your projects and keep them up to date.

Swimburger commented 1 year ago

@waynebrantley System.Text.Json is supported on netstandard2.0 too, so the Twilio library should be able to use those APIs on all supported versions of .NET, except for .NET Framework 3.5. .NET Framework 3.5 could keep using Newtonsoft.Json.

waynebrantley commented 1 year ago

@Swimburger agree - just need to get it done. Those on netframework 3.5 dont have to upgrade either. Hard to believe people are still on that... 5.5yrs left on support for it...so time is ticking down!

Any movement inside Twilio to get this done?

Swimburger commented 1 year ago

@waynebrantley I don't have visibility on that as a former Twilion, but I don't expect this to be done anytime soon.

josephrodriguez commented 10 months ago

Came to this problem for the same reason when I saw the use of Newtonsoft.Json. It's really a bit disconcerting how this project evolve so slowly in the face of changes in the .NET ecosystem, mainly when is the SDK project of a well know company like Twilio. Newtonsoft library was deprecated for .NET Core 3 at Sep 23, 2019, we are using .NET 8.

tiwarishubham635 commented 6 months ago

We tried to address this issue in version 7.0.0 however this issue (#732) came up as people were still using previous versions.

Swimburger commented 6 months ago

We tried to address this issue in version 7.0.0 however this issue (#732) came up as people were still using previous versions.

Removing .NET Framework support doesn't make sense since it's still highly in use.

The built-in JSON library System.Json.Text is supported on .NET6, .NET Framework 4.6.2, and .NET Standard 2.0. In fact, you could just build for .NET Standard 2.0 and then .NET 6+ and .NET Framework 4.6.2+ would use that build.

You can remove newtonsoft.json and replace it with System.Json.Text. Newtonsoft.json very often causes issues because so many libraries depend on different versions of the library causing version conflicts. So not taking that dependency would reduce friction for users of this library.

tiwarishubham635 commented 6 months ago

Sure, I'll check that

tiwarishubham635 commented 5 months ago

I was checking here and it says we need .NET Framework 4.7.2+. Won't that be an issue for many users?

Swimburger commented 5 months ago

@tiwarishubham635 That's odd. I have created a GitHub issue for them to clarify this. https://github.com/dotnet/docs/issues/41005

Swimburger commented 5 months ago

They updated the docs. The support is .NET Framework 4.6.2+