Too many instances of Newtonsoft.Json #29
Replies: 8 comments
-
There's also an "official" one provided by Unity. |
Beta Was this translation helpful? Give feedback.
-
@MeikelLP I don't know it's a bug or something else, the com.unity.nuget.newtonsoft-json is hidden in the package manager ui by default. See the screenshot, the package list has no one starts with letter N (show preview is on). However, if I manually add the package name to dependency. Or use my CLI:
Then it behaves normally in the all package list, even I remove the package. Anyway this is a bit off-topic. |
Beta Was this translation helpful? Give feedback.
-
While, at least they have very different namespaces... After applejag/Newtonsoft.Json-for-Unity#33, we can include https://github.com/jilleJr/Newtonsoft.Json-for-Unity to the awesome-upm. For now, I will either use the Unity one or https://github.com/PixelWizards/com.newtonsoft.json (current available on OpenUPM) |
Beta Was this translation helpful? Give feedback.
-
I'm only using Unity's json package. AFAIK the package is hidden because it is in the I think only packages from https://bintray.com/unity/unity are listed in the UI (?) |
Beta Was this translation helpful? Give feedback.
-
Using said Newtonsoft.Json package from PixelWizards is highly discouraged as it is just using Unity's package (https://bintray.com/unity/unity/com.unity.nuget.newtonsoft-json) that's only meant for internal use at Unity, not for users of Unity. To quote the
More importantly is that you will not be able to get any support from Unity because of this. And for the record, version 2.0.0-preview of their package is actually using the AOT build from my npm released version 12.0.1 (old and outdated). I've in some mail chats with a Unity developer tried to reason about this, and it seems they will be wanting to take in external packages to be available through Unity without having to add custom scoped registries, but that plan is not ready yet. With my repo I've tried to unify the lessons from the previous repos and their creators. ParentElement, author of the original JSON. NET assets store package is about to start helping with my fresh repo, and I'm hoping to get hold of SaladLabs soon too. |
Beta Was this translation helpful? Give feedback.
-
For me personally I don't think I will ever need support for that package. And if Unity is using it internally I will use it as well because it is guaranteed to work. Most of Unity's useful stuff is "internal" or not open for public. It is there but Unity doesn't allow you to use it in the conventional way. That is/was always annoying about Unity. My opinion. |
Beta Was this translation helpful? Give feedback.
-
Understandable opinion but I highly disagree. It is not guaranteed to work, it's just that it works enough for the Unity team that uses said package. Seeing that Unity even snagged my version directly it's fare to say that my package is ok to use. There's even some bugs in the version that the Unity devs snagged that they haven't updated regarding IL2CPP builds and strong naming. Sorry if I just jumped into the discussion. But there are not any benefits of using Unity's temp/internal package when there's more full fletched solutions available. Main difference is that mine requires a custom scoped registry, which is not a burden at all. |
Beta Was this translation helpful? Give feedback.
-
Alright, to wrap up:
In the end, we have 2 Newtonsoft.Json repos in total, which is acceptable in my opinion. I am closing this issue for now, but you can feel free to continue the discussion. |
Beta Was this translation helpful? Give feedback.
-
The table lists three different forks of Netwonsoft.Json. None of them are meaningfully different from each other.
Also, none of them are very popular. I propose they all get replaced with this much more popular, much more active fork.
Beta Was this translation helpful? Give feedback.
All reactions