-
Notifications
You must be signed in to change notification settings - Fork 131
This project vs com.unity.nuget.newtonsoft-json
#145
Comments
I was using jilleJr for json in an old Unity project (year or so ago), and I've come back to the project recently. I was interested in updating the project's Unity editor version from Am I correct in assuming there's no way to remove |
Yeah, correct. In detail: while the core Unity editor itself does not depend on If you were to empty out your |
Very sad news. 😢 Unity requires Editor From what I can tell, Unity's built in JSON utilities (aka Sorry to ask about "competitors", but do you know of any other JSON tooling for Unity that may be alternatives? |
@scott-lin hey don't worry! It's a valid question. A few years ago I researched and created a list of alternatives. So mind you, it's probably quite out of date. But here they are:
Or if you don't mind changing format, trying out XML might be a valid solution as .NET has had built in support for ages:
Or if you want to try other binary formats, then maybe something like Cap'n Proto, Google's protobuf, or Apache Thrift might be good:
I've not tried any of the above packages, so you'll have to verify their Unity and IL2CPP support yourself. Hope you find a solution! |
Big news: Unity has now officially adopted the package 🎉🎊🎉I've updated the issue description with more information |
(Last updated: 2022-03-03)
Is this package compatible with
com.unity.nuget.newtonsoft-json
?No. Sadly not. Reason for this is the combination of:
Cannot have multiple .NET assemblies with the same name in a project at the same time.
All files in Unity's and my package has the same GUIDs (in their
.dll.meta
,.md.meta
,.asmdef
, etc).Plans on making it compatible with
com.unity.nuget.newtonsoft-json
?There's no plan in making them compatible. There's too many techincal limitations in play here that makes it practically impossible.
There are however plans on resolving this with some Unity devs. I've had a years long discussion with some Unity developers on the topic almost since the dawn of this fork. Fun trivia: the same discussion that
com.unity.nuget.newtonsoft-json@v2
was created from to begin with.Different with this project and
com.unity.nuget.newtonsoft-json
?Unity's "official" Newtonsoft.Json package, starting with version 2.0.0-preview.1, is a fork of this repo. They have practically "just" republished my fork as their own.
Just so there's no confusion: It's in their full right to do so. And in fact, one of their super kind developers reached out beforehand just to confirm it would be OK with me, something they didn't have to do, but I really appreciate that they did.
Is
com.unity.nuget.newtonsoft-json
safe to use?Edit 2022-03-03: Since late February 2022, starting with v3.0.0 of their package, Unity has now committed to maintaining their fork to keep it up-to-date with the upstream JamesNK/Newtonsoft.Json, providing customer support, as well as publishing their package publicly inside Unity's official UPM registry.
They are just about to make it public, but until then, you can follow my guide on install the official Newtonsoft.Json UPM package over at my wiki.
Latest news on Unity adopting
jilleJr/Newtonsoft.Json-for-Unity
for real?Edit 2022-03-03: It is now a reality! My fork can now be considered dead, in favor of Unity's package, starting with v3.0.0: https://docs.unity3d.com/Packages/[email protected]/manual/index.html
For the long run, Unity is working hard on the .NET 6 adoption and for the long run are looking for using .NET's built in System.Text.Json package instead, leaving end-users free to choose between Newtonsoft.Json or System.Text.Json. Read more: https://forum.unity.com/threads/unity-future-net-development-status.1092205/
What's the future of
jilleJr/Newtonsoft.Json-for-Unity
?Edit 2022-03-03: I am officially deprecating this package in favor of Unity's package, as stated above.
I will stop providing:
However, I will still provide:
The text was updated successfully, but these errors were encountered: