Netwonsoft Json Unity Package Clashes

This was the closest forum I could find to post into.

The Netwonsoft Json Unity Package that is forced into new projects, clashes with previously inlcuded Netwonsoft Json DLLs. Why would I want my own DLL in there? The answer is simple - because I want a version that has been recompiled to be AOT compatible (IL2CPP, iOS etc, etc).

Unless the Netwonsoft Json Unity Package has been compiled to be AOT compatible (which there’s no mention of), the inclusion is just plain bad. And trying to remove it caused further issues, so it’s in fact in-use and required.

It IS possible to have an AOT version of the Newtonsoft Json library, so mabe that should be looked into?

1 Like

Can u even reference the newstonsoft.json namespace from the forced dll?

There’s a rarely-used C# feature designed for this very scenario, you can use an extern alias. Of course the proper solution would be to only have one Newtonsoft.Json.