I have a div:
that gets populated by JQuery using innerHTML with strings from client side jav
Go this way
$('#contract').text(JSON.stringify(data));
or
$('#contract').append( $('').text( JSON.stringify(data, null, ' ') ) )
').text( JSON.stringify(data, null, ' ') ) )