Master Light Switch Rule, Color Temperature by Sun elevation, Press-and-hold dimming

Only if openHAB is not running when you edit it. And if you have one } or , out of place you’ll hose the whole file. I do not recommend editing the file directly. If you want an easier way to add metadata than using MainUI, I recommend using the REST API docs. The JSON will always be valid and you can add/remove/update metadata while OH is running.

See OH 3 Tips and Tricks which has a section about using the REST API to make bulk updates and editing the JSONDB files if all else fails.

Building Pages - Components & Widgets | openHAB shows all the expressions that are available to you in a widget. JavaScript String Reference shows all you can do with a JavaScript String Object.