Is it possible to write an HTML string inside JSON?
Which I want to write like below in my JSON file:
[
{
\"id\": \"services.html\",
One way is to replace the double quotes in the HTML with single quotes but using double quotes has become the standard convention for attribute values in HTML.
The better option is to escape the double quotes in json and other characters that need to be escaped.
You can get some more details about escaping here: Where can I find a list of escape characters required for my JSON ajax return type?