> For the complete documentation index, see [llms.txt](https://doc.realvirtual.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.realvirtual.io/advanced-topics/newtonsoft-json.md).

# 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
