This repo is a fork of JamesNK/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).
-
(🌟 new!) Newtonsoft.Json-for-Unity.Converters package for converting Unity types, such as the Vector3, Quaternion, Color, and many, many more!
-
Full support for IL2CPP builds
-
Delivered via Unity Package Manager for easy updating and version switching
-
Full Newtonsoft.Json.Tests test suite passes on Unity 2018.4.14f1 and 2019.2.11f1 with Mono and IL2CPP as scripting backend.
-
Precompiled as DLLs for faster builds
-
Newtonsoft.Json.Utility.AotHelper utility class for resolving common Ahead-Of-Time issues. (Read more about AOT)
Installation via Package Installer (experimental)
-
Click here to download
Install-jillejr.newtonsoft.json-for-unity-12.0.302.unitypackage
-
Open the downloaded
.unitypackage
file in Unity. Easiestly done by drag'n'dropping the file into the Unity window. -
Click "Import" to import it all.
-
Once the installer has successfully compiled, it will add the correct UPM registry and package to your project, followed by removing itself.
The installer does not run until your project can successfully compile. Make sure to resolve all syntax- and other compiling errors, even just temporarily, so that the installer may execute.
Much love ❤️ to @needle-tools for making such a great tool!
Installation via OpenUPM
openupm add jillejr.newtonsoft.json-for-unity
Full installation guide over at the wiki: Installation via OpenUPM
Much love ❤️ to @favoyang for making such a great tool!
Full installation guide over at the wiki: Installation via pure UPM
You can also install via Git. This assumes you have Git installed on your computer.
This is the least recommended version (but works as a fallback) because:
You will not be able to update the package via the Package Manager interface if you install via Git.
This requires you, your coworkers, and your CI/CD pipelines to have Git installed for the project to build.
It takes a lot longer to install as UPM will in most version clone the entire history of the project.
In later versions of Unity, you can import directly via the Package Manager interface.
Supply the following URL:
https://github.com/jilleJr/Newtonsoft.Json-for-Unity.git#upm
Full installation guide over at the wiki: Installation via Git in UPM
- Newtonsoft.Json-for-Unity Wiki: Wiki of this fork
- Newtonsoft.Json-for-Unity release notes: Release notes of this fork
- Newtonsoft.Json-for-Unity package repo: Cloudsmith package
- Newtonsoft.Json-for-Unity QA: GitHub discussions
- Newtonsoft.Json repo: github.com/JamesNK/Newtonsoft.Json
- Newtonsoft.Json homepage: www.newtonsoft.com/json
- Newtonsoft.Json documentation: www.newtonsoft.com/json/help
- Newtonsoft.Json release notes: Release Notes of source repository
- Newtonsoft.Json QA: Stack Overflow posts tagged with
json.net
Thankful that you're even reading this :)
If you want to contribute, here's what you can do:
-
Spread the word! ❤ More users → more feedback → I get more will-power to work on this project. This is the best way to contribute!
-
Open an issue. Could be a feature request for a new converter, or maybe you've found a bug?
-
Tackle one of the unassigned issues. If it looks like a fun task to solve and no one is assigned, then just comment on it and say that you would like to try it out.
I realize that few of the issues are trivial, so if you wish to tackle something small then look at the list of unassigned issues over at the Unity converters package repoistory.
-
Open a PR with some new feature or issue solved. Remember to ask before starting to work on anything, so no two are working on the same thing.
Having a feature request or issue pop up and having the submitter suggesting themselves to later add a PR for a solution is the absolute greatest gift a repository maintainer could ever receive. 🎁
I have this CONTRIBUTING.md file that contains some guidelines. It may be good to read it beforehand.
Open the Src/Newtonsoft.Json.sln
solution file in Visual Studio and start
hacking.
Rule of thumb: Don't commit edits of the Src/Newtonsoft.Json/
,
Src/Newtonsoft.Json.Tests/
, or Src/Newtonsoft.Json.TestConsole/
folders
for forking reasons. Exception is when doing a new release, as explained in
a section little further down below.
-
Powershell:
For Linux users, install the
dotnet
CLI and then install thepowershell
tool:# This will install the command `pwsh` dotnet tool install --global powershell
-
Docker
./ci/local_build_into_package.ps1
This script will compile the project into the
Src/Newtonsoft.Json-for-Unity/Plugins
directory using Docker images.
Common enough occurrence that we have a wiki page for just this.
Read the Working with branches, section "Merging changes from JamesNKs repo" wiki page.
This project, giving a stable Newtonsoft.Json experience to the Unity community, is a hobby project for me and will always stay free.
If this tool gave you something you value, consider giving a coin back into this tool. Sponsor me with a cup of coffee, I drink the cheap stuff! ☕
This package is licensed under The MIT License (MIT)
Copyright © 2019 Kalle Jillheden (jilleJr)
https://github.com/jilleJr/Newtonsoft.Json-for-Unity
See full copyrights in LICENSE.md inside repository