Java library for JSON generation?

Does the standard openHAB installation (Docker image) includes any Java library that can be used to generate JSON?

I am using the Webhook HTTP binding, where I can use JEXL expressions to build a string that is passed on to a JavaScript. I would like to generate JSON within the JEXL and then parse it in the JavaScript. In JEXL I have access to Java classes. I know I could add my own JAR with a JSON library to my openHAB installation, but if possible I’d rather go with something that’s included with openHAB anyway.

Sure, openHAB itself does much JSON (de-)serialization using Gson.
In general, see Coding Guidelines | openHAB for the included default libraries used for various things.

However I have just noticed that parts of this list seem outdated …

1 Like

Great, it works, thanks!

1 Like