applejag / Newtonsoft.Json-for-Unity

Newtonsoft.Json (Json.NET) 10.0.3, 11.0.2, 12.0.3, & 13.0.1 for Unity IL2CPP builds, available via Unity Package Manager
https://github.com/jilleJr/Newtonsoft.Json-for-Unity
MIT License
1.15k stars 128 forks source link

Add com.unity.nuget.newtonsoft-json compatibility #140

Open applejag opened 2 years ago

applejag commented 2 years ago

Description

The com.unity.nuget.newtonsoft-json version 2.0.0 and above has clashing GUIDs for the Unity assets, as mentioned by #139 and https://github.com/jilleJr/Newtonsoft.Json-for-Unity/discussions/135.

Unity did not regenerate the GUIDS when they forked my package (nothing to blame them for, as their fork is only meant for Unity's internal use anyway), and so now my package cannot coexist with theirs.

Then there's the DLL and namespace issue: Only one Newtonsoft.Json.dll assembly and only one Newtonsoft.Json namespace can be imported at the same time.

Motivation

Using Newtonsoft.Json in Unity is getting worse by the day. Leaks has to be plugged, and if this package could at least bring some better compatibility then that's nice.

Suggested solution

GUIDs needs to be regenerated. This could break things for some, but help others. Though choice.

Then regarding the assembly issue, we could either:


Note: I, @jilleJr, will not fix either of the GUID nor assembly clash issues until I figure out a way I can solve both, because without both resolved there isn't any added value.