In my Ajax request (using jQuery) I am returning a JSON response.
So json.Html will have a string of HTML I want to append inside a div.
On the server side,
If you are using PHP json_encode does the trick for you:
$htmlSnippet = '';
return json_encode(array("html" => $htmlSnippet));
In jQuery you either declare the dataType 'json' (see answer above) or decoding by jQuery.parseJSON