Skip to content
DataMiner DoJo

More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages
Search in posts
Search in pages
Log in
Menu
  • Blog
  • Questions
  • Learning
    • E-learning Courses
    • Empower Replay: Limited Edition
    • Tutorials
    • Open Classroom Training
    • Certification
      • DataMiner Fundamentals
      • DataMiner Configurator
      • DataMiner Automation
      • Scripts & Connectors Developer: HTTP Basics
      • Scripts & Connectors Developer: SNMP Basics
      • Visual Overview – Level 1
      • Verify a certificate
    • Video Library
    • Books We Like
    • >> Go to DataMiner Docs
  • Expert Center
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Markets & Industries
      • Media production
      • Government & defense
      • Content distribution
      • Service providers
      • Partners
      • OSS/BSS
    • DataMiner Insights
      • Security
      • System Architecture
      • DataMiner Releases & Updates
    • Agile
      • Agile Webspace
      • Everything Agile
        • The Agile Manifesto
        • Best Practices
        • Retro Recipes
      • Methodologies
        • The Scrum Framework
        • Kanban
        • Extreme Programming
      • Roles
        • The Product Owner
        • The Agile Coach
        • The Quality & UX Coach (QX)
    • DataMiner DevOps Professional Program
  • Downloads
  • More
    • Feature Suggestions
    • Climb the leaderboard!
    • Swag Shop
    • Contact
      • General Inquiries
      • DataMiner DevOps Support
      • Commercial Requests
    • Global Feedback Survey
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Deal Registration
  • >> Go to dataminer.services

QAction in C#: JSON Library missing?

Solved1.63K views7th July 2023C++ JSON Library QAction
9
Dominique Bodart [DevOps Member]693 10th March 2023 0 Comments

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#?

Marieke Goethals [SLC] [DevOps Catalyst] Selected answer as best 7th July 2023

4 Answers

  • Active
  • Voted
  • Newest
  • Oldest
9
Floris Cockaerts [SLC] [DevOps Advocate]2.43K Posted 10th March 2023 0 Comments

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.

Marieke Goethals [SLC] [DevOps Catalyst] Selected answer as best 7th July 2023
5
Jorge Dias [SLC] [DevOps Enabler]4.76K Posted 10th March 2023 2 Comments

Hi Dominique,

You need to add a Newtonsoft nuget package to your QAction project.

Michiel Oda [SLC] [DevOps Enabler] Posted new comment 10th March 2023
Dominique Bodart [DevOps Member] commented 10th March 2023

Hi Jorge,
Ihave tried to search for the Newtonsoft.Json packet but the nuget package manager list is empty and it is not finding the packet.

For info, I use DIS2019 and I tried to download with donet:
dotnet add package Newtonsoft.Json –version 13.0.3

But is not working because our donet version is 2.1.5 and that method only works with donet version higher than 2.12. But, if I want to upgrade donet to the latest version, it is said it will only work with DIS 2022 …

Michiel Oda [SLC] [DevOps Enabler] commented 10th March 2023

Hi Dominique
Visual Studio 2019 is still fine. Could you have a look at which package sources are enabled? Probably the default one for nuget.org is not there: https://community.dataminer.services/question/nuget-package-references-not-installed/

5
Michiel Oda [SLC] [DevOps Enabler]3.58K Posted 10th March 2023 0 Comments

Hi Dominique

Depending on your DataMiner version (10.0.10 +), you can just add the Newtonsoft.Json NuGet package to the QAction that needs it. When publishing with DIS, it will upload the protocol with the necessary DLLs that are extracted from the NuGet packages.

Michiel Oda [SLC] [DevOps Enabler] Answered question 10th March 2023
4
Rebecca Kelsall [DevOps Advocate]670 Posted 10th March 2023 0 Comments

We often use custom DLL's and download the version we need to use and store it in the ProtocolScripts Folder of the DMA you are using and ensure we are referencing it in the XML.
We normally add in some C# exception handling within the StartUp QAction to let us know if any of the DLLs we are expecting are not already on the DMA in the ProtocolScripts folder. This can be really useful if you have to move your elements to a new DMA or reuse the driver in another DMS. Depending on the type of driver this would either be raised into the logs or as an alarmable parameter.

Rebecca Kelsall [DevOps Advocate] Answered question 10th March 2023
Please login to be able to comment or post an answer.

My DevOps rank

DevOps Members get more insights on their profile page.

My user earnings

0 Dojo credits

Spend your credits in our swag shop.

0 Reputation points

Boost your reputation, climb the leaderboard.

Promo banner DataMiner DevOps Professiona Program
DataMiner Integration Studio (DIS)
Empower Katas

Recent questions

Invoke HTTP Session from QAction 1 Answer | 1 Vote
Masked alarmes permission management 0 Answers | 0 Votes
Remove all Widgets from Section 2 Answers | 5 Votes

Question Tags

adl2099 (115) alarm (62) Alarm Console (82) alarms (100) alarm template (83) Automation (223) automation scipt (111) Automation script (167) backup (71) Cassandra (180) Connector (109) Correlation (69) Correlation rule (52) Cube (151) Dashboard (194) Dashboards (188) database (83) DataMiner Cube (57) DIS (81) DMS (71) DOM (140) driver (65) DVE (56) Elastic (83) Elasticsearch (115) elements (80) Failover (104) GQI (159) HTTP (76) IDP (74) LCA (152) low code app (166) low code apps (93) lowcodeapps (75) MySQL (53) protocol (203) QAction (83) security (88) SNMP (86) SRM (337) table (54) trending (87) upgrade (62) Visio (539) Visual Overview (345)
Privacy Policy • Terms & Conditions • Contact

© 2025 Skyline Communications. All rights reserved.

DOJO Q&A widget

Can't find what you need?

? Explore the Q&A DataMiner Docs

[ Placeholder content for popup link ] WordPress Download Manager - Best Download Management Plugin