[asp.net-mvc] Where can I find a list of escape characters required for my JSON ajax return type?

I have an ASP.NET MVC action that is returning a JSON object.


{status: "1", message:"", output:"<div class="c1"><div class="c2">User generated text, so can be anything</div></div>"}

Currently my HTML is breaking it. There will be user generated text in the output field, so I have to make sure I escape ALL things that need to be escaped.

Does someone have a list of all things I need to escape for?

I'm not using any JSON libraries, just building the string myself.

This question is related to asp.net-mvc json escaping

The answer is

Take a look at http://json.org/. It claims a bit different list of escaped characters than Chris proposed.

\u four-hex-digits

Similar questions with asp.net-mvc tag:

Similar questions with json tag:

Similar questions with escaping tag: