var jsonString = String.raw`{"EmployeeMaster":{"ImageContent":null,"ImageName":null,"EMP_PhotoPath":"E:\BBM0000000001comparison.png"}}`;
jsonString = jsonString.replace("\\","\\\\");
var jsonObj = JSON.parse(jsonString);
alert(jsonObj.EmployeeMaster.EMP_PhotoPath);
You can Achieve this by doing something like this:
var jsonString = String.raw`{"EmployeeMaster":{"ImageContent":null,"ImageName":null,"EMP_PhotoPath":"E:\BBM0000000001comparison.png"}}`;
jsonString = jsonString.replace("\\","\\\\");
var jsonObj = JSON.parse(jsonString);
String.raw is a method you can use to get the original string without interpretation,
It's used to get the raw string form of template strings (that is, the original, uninterpreted text).
So you can replace the backslash with double backslashes, then you can parse it to keep the original backslash.
[...]th":"E:\\BBM00000[...]Newtonsoft.JSONConverthas a bug in it if it's not escaping the slash.I doubt that, so I think your actual problem lies elsewhere.