-
Notifications
You must be signed in to change notification settings - Fork 131
Home
Since late February 2022, Unity has now published an updated version of their
package: [email protected]
Their package has been a fork of my package ever since,
[email protected]
, but it has not been intended
for public use. But since now that has changed!
v3.0 of their package is still a fork of my package, but now dedicated Unity employees will maintain and support it instead of me. All future versions of their package will from now on continue branching off from my package, while my package remains marked as deprecated.
I will not add features nor publish any bug fixes. It is recommended to transition to Unity's package as soon as possible to ensure you get the latest patches.
I will not remove my package from Cloudsmith. It will remain published until the end of Cloudsmith or their free open source tier.
Json.NET is a popular high-performance JSON framework for .NET
This repo is a fork of Newtonsoft.Json containing custom builds for regular standalone, but more importantly AOT targets such as all IL2CPP builds (WebGL, iOS, Android, Windows, Mac OS X) and portable .NET (UWP, WP8).
Available for installation with
- Unity Package Manager (UPM)
-
OpenUPM
new!
-
UniGet(coming soon) -
Unity Asset packages(coming soon) -
Unity Asset Store(coming soon)
This Wiki is for this repository, Newtonsoft.Json-for-Unity, and will not contain pages with how-to lists that solely aim at the official Newtonsoft.Json by JamesNK.
-
✔ Installation guide into your Unity project, via UPM, OpenUPM,
UniGet, UnityPackage, and the Assets Store.Coming soontm -
✔ How to update the package, via UPM,
UniGet, UnityPackage, and the Assets Store.Coming soontm -
🕓
Guides how to serialize/deserialize Unity objects (GameObject, Vector3, Scenes, et.al)//todo -
🕓
Using Newtonsoft.Json in your own class library you've imported into Unity.//todo -
🕓
Using third party dependencies (DLLs) inside Unity that themselves use Newtonsoft.Json.//todo
- ❌ Guides and help about how to serialize/deserialize using Newtonsoft.Json
- ❌ What's the difference between the names Newtonsoft.Json and Json.NET?
- ❌ Game development tutorials
- ❌
How to make a fortune with Bitcoins (₿) in 5 easy steps🤪
To receive info about one of these topics I'm omitting from this wiki, visit one of the official Json.NET links below:
- Source repository (github.com/JamesNK/Newtonsoft.Json)
- Homepage (www.newtonsoft.com/json)
- Documentation (www.newtonsoft.com/json/help)
- Release Notes (github.com/JamesNK/Newtonsoft.Json/releases)
- Stack Overflow 'Json.NET' tag (stackoverflow.com/questions/tagged/json.net)
- Stack Overflow 'Unity3D' tag (stackoverflow.com/questions/tagged/unity3d)
Unity has now published a maintained fork of my repo, and they will continue to maintain their own fork and keep it up-to-date. The package can be found at https://docs.unity3d.com/Packages/[email protected]/manual/index.html, and I've written some installation instructions here that you can refer to until Unity has their own installation instructions: Install official UPM package
Using 2017.*
or below? Here are some alternative projects that may suffice for
your Unity project:
-
Newtonsoft Json.NET for Unity3D by SaladLab
Delivers up to Newtonsoft.Json 9.0.1
github.com/SaladLab/Json.Net.Unity3D -
JSON .NET for Unity by ParentElement
Delivers up to Newtonsoft.Json 8.0.3
parentelement.com/assets/json_net_unity
assetstore.unity.com/packages/tools/input-management/json-net-for-unity -
Unity.Newtonsoft.Json by Ashley Davis
Delivers up to Newtonsoft.Json 7.0.0
github.com/codecapers/Unity.Newtonsoft.Json(archived)
nuget.org/packages/Unity.Newtonsoft.Json
SaladLab and ParentElement, among other unmentioned coders, have done great work in making Json.NET work in Unity. So why do we need mine?
Both mentioned projects are discontinued, and outdated by some margin in result. SaladLab's latest release targets Json.NET 9, and ParentElement's Json.NET 8. We're at Json.NET 12 now! (at time of writing)
Changeset, compared to SaladLabs and ParentElements solutions:
- Json.NET version 12 (let's see how long I can keep up with James repo)
- Release available via Unity Package Manager
- Unit testing in Unity Editor
- Unit testing in IL2CPP built platforms (ex: StandaloneWindows)
A rework is in this case easier than jumping into SaladLabs project to update it. Sorry Salad champ.
Although, in the future this may also be old stuff too, with the upcoming new System.Text.Json namespace and need to keep the project up-to-date with Newtonsoft.Json. But not for now!
I (jilleJr) will wear this project with pride, but not enough to ignore the other amazing works done by others.
While my repo will live for some time, for future reference here are some good alternatives (that all work in Unity) that I personally recommend if my solution dips below your expectations:
-
OdinSerializer
github.com/TeamSirenix/odin-serializer -
UTF8Json
github.com/neuecc/Utf8Json -
FastJSON
assetstore.unity.com/packages/tools/input-management/fastjson-27220 -
UltimateJson
assetstore.unity.com/packages/tools/integration/ultimate-json-60845 -
SimpleJson
wiki.unity3d.com/index.php/SimpleJSON -
LitJson
github.com/Mervill/UnityLitJson -
FullSerializer
github.com/jacobdufault/fullserializer -
protobuf-net
github.com/protobuf-net/protobuf-net
Of course I want my project to get better, so please create a GitHub issue on jilleJr/Newtonsoft.Json-for-Unity when you have some troubles or want a new feature.
Happy Json parsing!
new!
Unity's package is now officially ready for public use: Install official UPM package
This package is licensed under The MIT License (MIT)
Copyright © 2019 Kalle Jillheden (jilleJr)
https://github.com/jilleJr/Newtonsoft.Json
See full copyrights in LICENSE.md inside repository
About- Home
-
Install Newtonsoft.Json
Deprecated:
-
Install converters for Unity