FB_JsonSaxWriter
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_JsonSaxWriter
VAR_OUTPUT
initStatus : HRESULT;
END_VAR
Outputs
Name | Type |
---|---|
initStatus | HRESULT |
Methods
Name | Description |
---|---|
Adds a value of the data type Base64 to a property. | |
Adds a value of the data type BOOL to a property. | |
Adds a value of the data type DATE_AND_TIME to a property. | |
Adds a value of the data type DCTIME to a property. | |
Adds a value of the data type DINT to a property. | |
Adds a value of the data type FILETIME to a property. | |
Adds a HexBinary value to a property. | |
Adds a new property key at the current position of the SAX Writer. | |
Creates a new property key and at the same time a value of the data type BOOL. | |
Creates a new property key and at the same time a value of the data type DATE_AND_TIME. | |
Creates a new property key and at the same time a value of the data type DCTIME. | |
Creates a new property key and at the same time a value of the data type FILETIME. | |
Creates a new property key and at the same time a value of the data type LREAL. | |
Creates a new property key and initializes its value with null. | |
Creates a new property key and at the same time a value of the data type DINT. | |
Creates a new property key and at the same time a value of the data type STRING. | |
Adds a value of the data type LINT to a property. | |
Adds a value of the data type LREAL to a property. | |
Adds the value null to a property. | |
Adds a valid JSON array to a given property as a value. | |
Adds a valid JSON object to a given property as a value. | |
Adds a value of the data type REAL to a property. | |
Adds a value of the data type STRING to a property. | |
Adds a value of the data type UDINT to a property. | |
Adds a value of the data type ULINT to a property. | |
Copies the contents of the JSON object currently created with the SAX Writer into a target variable of the data type STRING. | |
Creates the end of a started JSON array and inserts it at the current position of the SAX Writer. | |
Creates the end of a started JSON object and inserts it at the current position of the SAX Writer. | |
Returns the content of the JSON object that is currently created with the SAX Writer and returns it as data type STRING(255). | |
Returns the length of the JSON object that is currently created with the SAX Writer and returns it as data type UDINT. | |
| |
IsComplete |
|
Resets the JSON object currently created with the SAX Writer. | |
| |
Creates the start of a new JSON array and inserts it at the current position of the SAX Writer. | |
Creates the start of a new JSON object and inserts it at the current position of the SAX Writer. |
Requirements
TwinCAT version | Hardware | Libraries to be integrated |
---|---|---|
TwinCAT 3.1, Build 4022 | x86, x64, ARM | Tc3_JsonXml |
- AddBase64
- AddBool
- AddDateTime
- AddDcTime
- AddDint
- AddFileTime
- AddHexBinary
- AddKey
- AddKeyBool
- AddKeyDateTime
- AddKeyDcTime
- AddKeyFileTime
- AddKeyLreal
- AddKeyNull
- AddKeyNumber
- AddKeyString
- AddLint
- AddLreal
- AddNull
- AddRawArray
- AddRawObject
- AddReal
- AddString
- AddUdint
- AddUlint
- CopyDocument
- EndArray
- EndObject
- GetDocument
- GetDocumentLength
- GetMaxDecimalPlaces
- ResetDocument
- SetMaxDecimalPlaces
- StartArray
- StartObject