diff --git a/config.go b/config.go index e97183c..4e14e7e 100644 --- a/config.go +++ b/config.go @@ -13,6 +13,21 @@ type Config struct { Rules []BrowserRuleConfig } +func (r *BrowserRule) UnmarshalJSON(data []byte) error { + var values struct { + command string + args []string + matchHostname []string + matchHostRegexp []string + matchRegexp []string + } + if err := json.Unmarshal(data, &values); err != nil { + return err + } + + return nil +} + // BrowserRuleConfig represents a BrowserRule type BrowserRuleConfig struct { BrowserCommand []string