Plugin.LocalNotification icon indicating copy to clipboard operation
Plugin.LocalNotification copied to clipboard

Newtonsoft.Json dependency

Open tranb3r opened this issue 2 years ago • 4 comments

Hi,

A few months ago, you made the switch from System.Text.Json to Newtonsoft.Json. Could you please explain why?

I think the future is System.Text.Json, and I'd like to get rid of Newtonsoft.Json in my app. Do you think it would make sense to remove this dependency in your plugin and switch back to System.Text.Json?

Thanks!

tranb3r avatar Jun 08 '22 14:06 tranb3r

@tranb3r if you rememebr https://github.com/thudugala/Plugin.LocalNotification/discussions/217

I switch to Json.NET - Newtonsoft, as System.Text.Json was throwing exceptions in iOS

thudugala avatar Jun 10 '22 09:06 thudugala

I remember :) But do you think the issue still exists with more recent versions of System.Text.Json ? Also, I see that you've removed the newtonsoft dependency for .net6 versions. Does it mean the issue is gone when using .net6? Do you plan to remove the dependency for xamarin as well? One more question: the Serializer in LocalNoficationCenter is now 'private set'. Is there a reason for this change? I would have liked to test again System.Text.Json serializer, but I cannot set it :/

tranb3r avatar Jun 13 '22 09:06 tranb3r

@tranb3r Serializer in LocalNoficationCenter will be set back to public again.

No plan to change to System.Text.Json in Xmarin but believe issue does not exist in iOS Maui

thudugala avatar Jun 14 '22 00:06 thudugala

@tranb3r, please try 10.0.0-preview02

you can change Serializer in this version

thudugala avatar Jun 27 '22 12:06 thudugala