problem merging views row-data into Drupal.settings
If the string literal is giving you what you want, I'd try this:

drupal_add_js(array('o4mmgal' =&gt; array($view-&gt;name =&gt; array('merged_rowdata' =&gt; $rowdata))), 'setting');