TcHmiSrv.Core.Tools.Json Namespaces

Contains types and namespaces to interact with JSON.

Namespaces

Namespace

Description

TcHmiSrv.Core.Tools.Json

Contains the JsonValue class that inherits from the Value class and stores a raw JSON String.

TcHmiSrv.Core.Tools.Json.Extensions

Provides extension methods for the core types of the TwinCAT HMI server extension API to convert them to and from JSON.

TcHmiSrv.Core.Tools.Json.Newtonsoft

Contains types and namespaces for the core types of the TwinCAT HMI server extension API to interact with types from the Newtonsoft.Json namespace.

Remarks

This implementation replaces the TcHmiSrv.DynamicSymbols.TcHmiSerializer class.
Instead of converting Objects direclty to and from Values, they're first converted into JSON Strings. Despite this intermediate step, conversions can be much faster than before because, for example, the use of relatively slow operations from the System.Reflection namespace can be completely dispensed.
To convert Objects to and from JSON Strings, you can use the JSON API of your choice. To convert Values and other types from the TcHmiSrv.Core namespace to and from JSON Strings Newtonsoft.Json is used.
This namespace contains many types that can be used with Newtonsoft.Json to implement a fast and reliable way to convert Objects of almost any type (including the core types of the TwinCAT HMI server extension API) to and from JSON.