Config UI: visualize Modbusproxy (#24015)

Co-authored-by: Michael Geers <michael@geers.tv>
This commit is contained in:
Maschga 2025-11-13 09:44:39 +01:00 • committed by GitHub
parent 7924922d4b
commit 07bcca2925
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 666 additions and 119 deletions

View file

@ -242,6 +242,11 @@ func Yaml(key string, other, res any) error {
return DecodeOtherSliceOrMap(other, res)
}
func IsJson(key string) bool {
s, err := String(key)
return err == nil && json.Unmarshal([]byte(s), &json.RawMessage{}) == nil
}
// wrapping Settings into a struct for better decoupling
type Settings struct{}