Settings are hard-coded to decode as [String:String], however if the PI sends other (valid) JSON types back the event will fail to decode. For instance, checkboxes might be sent as {"someKey": true}.
Settings should support any valid JSON. The simple fix is to deliver a Data blob to the Action to decode itself. A nicer solution would be to allow the Action to declare a Settings type that the plugin could then decode before forwarding to an Action.
Settings are hard-coded to decode as
[String:String]
, however if the PI sends other (valid) JSON types back the event will fail to decode. For instance, checkboxes might be sent as{"someKey": true}
.Settings should support any valid JSON. The simple fix is to deliver a
Data
blob to theAction
to decode itself. A nicer solution would be to allow theAction
to declare aSettings
type that the plugin could then decode before forwarding to anAction
.