> 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="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>


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
