Disable built-in Newtonsoft Json

Hey,

I am trying to import a library which requires Newtonsoft Json 13 however it is clashing with the built in package and I am not sure how to either remove the built-in one or update it to the correct version. What can I do?

Thanks!

This is a known Unity scripting limitation. This is caused by Unity packages depending on the “built-in” version.

Your best bet is to embed the “com.unity.nuget.newtonsoft-json” package into your project and you can modify it as you wish, e.g. update it to version 13 of the DLL.

Caveat: if that newer version of the DLL is not backward-compatible, you will have to either:

  1. fix the dependency: rebuild the DLL from the Newtonsoft.Json source (it’s Open Source) after fixing any issues in it to make it backward-compatible, or
  2. fix the dependent packages: embed any package that’s broken by the newer DLL and fix your code to be compatible with it.

@UnityMaru Hi. This is a serious issue for my project, where I rely on packages using Newtonsoft.Json version 13.0.3, while the unity one uses 13.0.2. What are my options here?
Thank you!