Import Json in Rules

Hi There,

i need one of those java dsl openhab rule specialists. I am still not over the idea to create json string and persists them. Firt problem ist to im port java JsonObject into the rule in general.

I searches and tried, but i always get the redline in Studio Code

import javax.json.JsonObject
import org.json.JSONObject
import com.google.gson.JsonObject

The question is, what am i missing?

Thomas

I don’t know if all of those libraries are available in Rules. Do you get errors in openhab.log when you try to run?

Hi Tomas.

how did you fix that problem?

Regars,
Vladislav