# Newtonsoft JSON

[Newtonsoft JSON](https://www.newtonsoft.com/json) is a very common library in C# for working with JSONs. Some interfaces (currently Open Digital Twin Interfaces as well as TwinCAT HMI) are depending on Newtonsoft JSON library. Formerly we had this library directly included in our delivery. Latest Unity started in adding dependencies to this library in some of the packages in the standard packages and in the standard project setting. This caused collissions with our delivery because only one DLL with the same name is allowed to be included in a project.

From the newest release on, we don't include any more Newtonsoft JSON in our delivery. For making our scripts to be compiled, in the case that in your project there is no Newtonsoft JSON included, we are having a Scripting Define Symbol (Compile Switch) which is REALVIRTUAL\_*JSON*.

{% hint style="info" %}
You only need to set this scripting define symbol if you want to use one of our interfaces which is depending on it (currently [TwinCAT HMI](https://doc.realvirtual.io/components-and-scripts/interfaces/twincat-hmi) and [Open Digital Twin Interface](https://doc.realvirtual.io/advanced-topics/page-5)).
{% endhint %}

If yo don't have any dependency in your project to Newtonsoft JSON you can manually add the dependency by adding this line to *manifest.json* (can be found in the folder Packes):

<figure><img src="https://260262196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpYxFg97YnJX96UzNNTSd%2Fuploads%2Fgit-blob-3091c65a961ef7219dc901bd90d57174a1524add%2Fmanifest-newtonsoft.png?alt=media" alt=""><figcaption></figcaption></figure>

As soon as you are sure, that Newtonsoft.JSON is available in your project, *REALVIRTUAL\_JSON* needs to be set in Scripting Define Symbols:

<figure><img src="https://260262196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpYxFg97YnJX96UzNNTSd%2Fuploads%2Fgit-blob-b4f20dd3b2893088342d4524e5da9f8e6b656a10%2Fnewtonsoftjson%23.png?alt=media" alt=""><figcaption><p>Newtonsoft compile switch in Scripting Define Symbols (in Project Settings > Player)</p></figcaption></figure>
