FB_JsonDomParser
This function block is derived from the same internal function block as FB_JsonDynDomParser and thus offers the same interface.
The two derived function blocks differ only in their internal memory management. FB_JsonDomParser is optimized for the fast and efficient parsing and creation of JSON documents that are only changed a little. The function block FB_JsonDynDomParser is recommended for JSON documents to which many changes are made.
| |
Use of router memory The function block occupies new memory with each change, e.g. with the methods SetObject() or SetJson(). As a result, the amount of router memory used can grow enormously after repeated actions. This allocated memory is only released again by calling the method NewDocument(). |
![]() | 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. |
Requirements
TwinCAT version | Hardware | Libraries to be integrated |
---|---|---|
TwinCAT 3.1, Build 4022 | x86, x64, ARM | Tc3_JsonXml |
- AddArrayMember
- AddBase64Member
- AddBoolMember
- AddDateTimeMember
- AddDcTimeMember
- AddDoubleMember
- AddFileTimeMember
- AddHexBinaryMember
- AddInt64Member
- AddIntMember
- AddJsonMember
- AddNullMember
- AddObjectMember
- AddStringMember
- AddUint64Member
- AddUintMember
- ArrayBegin
- ArrayEnd
- ClearArray
- CopyDocument
- CopyJson
- CopyString
- FindMember
- FindMemberPath
- GetArraySize
- GetArrayValue
- GetArrayValueByIdx
- GetBase64
- GetBool
- GetDateTime
- GetDcTime
- GetDocument
- GetDocumentLength
- GetDocumentRoot
- GetDouble
- GetFileTime
- GetHexBinary
- GetInt
- GetInt64
- GetJson
- GetJsonLength
- GetMaxDecimalPlaces
- GetMemberName
- GetMemberValue
- GetString
- GetStringLength
- GetType
- GetUint
- GetUint64
- HasMember
- IsArray
- IsBase64
- IsBool
- IsDouble
- IsFalse
- IsHexBinary
- IsInt
- IsInt64
- IsISO8601TimeFormat
- IsNull
- IsNumber
- IsObject
- IsString
- IsTrue
- IsUint
- IsUint64
- LoadDocumentFromFile
- MemberBegin
- MemberEnd
- NewDocument
- NextArray
- ParseDocument
- PushbackBase64Value
- PushbackBoolValue
- PushbackDateTimeValue
- PushbackDcTimeValue
- PushbackDoubleValue
- PushbackFileTimeValue
- PushbackHexBinaryValue
- PushbackInt64Value
- PushbackIntValue
- PushbackJsonValue
- PushbackNullValue
- PushbackStringValue
- PushbackUint64Value
- PushbackUintValue
- RemoveAllMembers
- RemoveArray
- RemoveMember
- RemoveMemberByName
- SaveDocumentToFile
- SetArray
- SetBase64
- SetBool
- SetDateTime
- SetDcTime
- SetDouble
- SetFileTime
- SetHexBinary
- SetInt
- SetInt64
- SetJson
- SetMaxDecimalPlaces
- SetNull
- SetObject
- SetString
- SetUint
- SetUint64