You could use the HTML escaped characters in the element data attribute to have JSON-like array (encoded are quotes):
<div id="demo" data-stuff="["some", "string", "here"]"></div>
And then in JavaScript get it without any additional magic:
var ar = $('#demo').data('stuff');
See this JSFiddle demo.
However, escaping isn’t necessary. You can do this, instead:
<div id="demo" data-stuff="["some", "string", "here"]"></div>
See this JSFiddle demo.