Most protocols and systems use well-defined data types for data point values. Most of them are simple one likes numbers (signed, unsigned) or boolean values (on/off). In such cases, the incoming values can simply me mapped to native data types that are supported by our server.
However, there are use case where data point values are provided by more complex types. A typical examples are systems that provide JSON or XML objects that encode the required values. In order to use data from these complex objects, a pre-processing for incoming or post-processing of outgoing data is necessary.
Within this article, it is assumed that an MQTT broker is providing the current weather information via MQTT topic. However, instead of providing weather values like wind speed or current outside temperature as native data, it provides a JSON object as string value. If the MQTT topic is configured correctly (for more information about MQTT see the following article), the JSON object will be shown within the Item Tree as follows: