Have some JavaScript that assigns values to an object using $.data and then uses JSON.stringify. It was working in 1.4.4 (got actual JSON data) but it is broken in 1.5.2+ (empty data).
What am I doing wrong?
$document.ready {
var o;
o = {};
$(o).data("to","to@email.com");
$(o).data("from","from@email.com");
$(o).data("html","true");
$('#log').append(JSON.stringify(o));
};
<div id="log" class="line1"></div>
Can be reproduced here: http://jsfiddle.net/Km4M4/6/
Your jsfiddle doesn’t have the JSON library included. Also, you’re invoking jQuery ready the wrong way.
But any reason why you cannot define it like this:
Updated working fiddle: http://jsfiddle.net/Km4M4/8/