FB_JsonDynDomParser

FB_JsonDynDomParser 1:

This function block is derived from the same internal function block as FB_JsonDomParser and thus offers the same interface.

The two derived function blocks differ only in their internal memory management. The FB_JsonDynDomParser is optimized for JSON documents where many changes are made and the JSON document is not released in between. It releases the allocated memory after an action has been executed, e.g. in the methods SetObject() or SetJson(). This flexibility results in greater overhead, allowing the FB_JsonDomParser to improve the performance.

FB_JsonDynDomParser 2:

Strings in UTF-8 format

The variables of type STRING used here are based on the UTF-8 format. This STRING formatting is common for MQTT communication as well as for JSON documents.

In order to be able to receive special characters and texts from a wide range of languages, the character set in the Tc3_IotBase and Tc3_JsonXml libraries is not limited to the typical character set of the data type STRING. Instead, the Unicode character set in UTF-8 format is used in conjunction with the data type STRING.

If the ASCII character set is used, there is no difference between the typical formatting of a STRING and the UTF-8 formatting of a STRING.

Further information on the UTF-8 STRING format and available display and conversion options can be found in the documentation for the Tc2_Utilities PLC library.

Syntax

FUNCTION_BLOCK FB_JsonDynDomParser
VAR_OUTPUT
  initStatus     : HRESULT;
END_VAR

FB_JsonDynDomParser 3: Outputs

Name

Type

initStatus

HRESULT

FB_JsonDynDomParser 4: Methods

All methods can be found in FB_JsonDomParser.

Requirements

TwinCAT version

Hardware

Libraries to be integrated

TwinCAT 3.1, Build 4024.7

x86, x64, ARM

Tc3_JsonXml 3.3.8.0