Duplicated JSON Dependency

Hello,

I’ve been exploring the localization package the last couple of days and it seems to do the job well for my needs so far. But the one concerning thing that I’ve noticed is that adding the localization package into my project now giving me the following errors:

It’s pretty clear what’s going on here, Newtonsoft’s Json.net assembly is being duplicated. My project heavily relies on this for a multitude of systems. I am using JilleJr’s Json for Unity package, maintained via the package manager to handle this. I’ve run across Unity’s Json.Net package that localization appears to use, this new addition is causing the conflicts here.

I’m very hesitant to use Unity’s Json package and have been advised from Unity staff to not use this package previously when I’ve run into this with other Unity packages. So I’m curious, what is the recommended workaround for this error when using the Localization package? Removing my implementation isn’t an option here due to the project setup using a shared code foundation utilized in other projects.

Thank you for the help!

Hi,
Could you please file a bug report so we can try and fix this?
We did used to generate a custom dll with all of our dependencies inside which fixed this issue however we removed this when we started using json in the player as well as the editor.
For now you may be able to fix it by embedding(move into the Projects Packages folder) the localization package and removing its dependency on the newtonsoft json, it should then switch to using the version you have included.

Clever!

That seems to resolve my issue for the time being, thank you.

And as requested, here is the bug: https://fogbugz.unity3d.com/default.asp?1404284_p4t8mqq11lv0oaj8

1 Like