SQL Server: Escape single quotes, double quotes, XML and forward slashes in JSON String

If you are writing the T-SQL directly then, given a valid JSON text you need to: Surround it with single quotes. Escape any single quotes in it Escape any escape sequences So the JSON: Would become Example without STRING_ESCAPE:Check example below with xml structure data where I added single quotes, double quotes, forward slashes in […]