# 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](/components-and-scripts/interfaces/twincat-hmi.md) and [Open Digital Twin Interface](/advanced-topics/page-5.md)).
{% 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="/files/fjMB1Y1nFBkpQThh36mK" 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="/files/IwHNdWKDSSpJWAkADOK4" alt=""><figcaption><p>Newtonsoft compile switch in Scripting Define Symbols (in Project Settings > Player)</p></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.realvirtual.io/advanced-topics/newtonsoft-json.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
