Problem/Motivation
Currently to pass jQuery dialog options onto drupal's dialogs you have to do something like:'data-dialog-options' => Json::encode(['width' => 400]),
This is kinda of annoying
Proposed resolution
Automatically encode the options if they are an array.
Remaining tasks
Patch
Test
User interface changes
None
API changes
data-dialog-options could be set as a json encode string or an array.
Data model changes
None