Hi,
I can see it is possible to parse JSON file with a QAction, something I need to do to interprete some HTTP request. So, in all example I saw on the Dojo, in QAction we have to add the Json library, for instance like that:
using Newtonsoft.Json;
But if I do on my system in DIS, I got an error saying it couldn't find that library name. So, Isn't part of the standard library in C#?
Hi Dominique,
Newtonsoft.Json is the most common way to parse to and from JSON messages, but it is still a custom library made by Newtonsoft and not part of your project by default.
If you are writing a connector that uses projects for QActions, then include the NuGet: NuGet Gallery | Newtonsoft.Json 13.0.3
If you are writing a connector that has the QAction code directly in the XML, add a dllImport reference to Newtonsoft.Json.dll
Because we use Newtonsoft in our core processes as well, this dll is part of the \Files folder. If you want to force a specific version of the dll with the second method, create a folder inside of the \ProtocolScripts folder and reference it as such. For example: dllOverride\Newtonsoft.Json.dll . This will force the QAction compilation to happen against this specific dll, and because it is signed, SLScripting will look for this exact version rather than the one found in \Files.