[Bug?] String Item parses content after update

  • Platform information:
    • openHAB version: openHAB 2.2.0~20171126174916-1 (Build #1099)


following Situation:
I initialize an array in habpanel for a dropdown list through an String Item, which contains json. (Its about fixed values)

Im not sure since which Version, but somehow the behaviour changed of updating a String Item with a json String via the smarthome CLI.

The following json was to be stored in a String item:

{"temperaturen": [{"temperatur": "25"}, {"temperatur": "23"}, {"temperatur": "21"}, {"temperatur": "19"}]}

I had to escape the " like this, which is understandable and the outcome of the String Item state was exact the same:

"{\"temperaturen\": [{\"temperatur\": \"25\"}, {\"temperatur\": \"23\"}, {\"temperatur\": \"21\"}, {\"temperatur\": \"19\"}]}"

BUT if I update an item with build #1099 via the smarthome CLI with the json string, now the following state is the output:

"\"temperaturen\": [{\"temperatur\": \"25\"}  {\"temperatur\": \"23\"}  {\"temperatur\": \"21\"}  {\"temperatur\": \"19\"}]"

as you can see, the curly brackets got parsed and also the commatas disappeared.

This cant be really a wanted behaviour - raw String Items shouldnt manipulate the content in any way!

If im mistaken here, please tell me so. :wink: Otherwise I would create a github issue.


PS: I create now the array as a workaround directly with angularjs. No more String Items needed.

I recommend filing an issue on the ESH repo