I'm trying to read in data in a bunch of in-page divs and use a plugin to pretty-print them:
$(".entries").each(function(){
var input = $(this).text();
$(this).JSONView(input, { collapsed: true });
});
and it all works nicely until I've got JSON that includes html encoded data, like this:
{ "0001" : { "size" : "16mo (6 1/2")", } }
Jquery's .text() and .html(), are converting the the html entity "
in the source to a real " and the string is not valid json for the next step.
Any ideas?