I am making this AJAX call:
function CreateProjectTree(sc) { debugger; $.ajax({ type: "POST", url: "../api/projects/SearchProjects", data: sc, contentType: "application/json; charset=utf-8", dataType: "json" }).done(function(data) { buildTree(data); }).fail(function(jqXHR, status, error) { console.log("Error: " + error); }); }
If the sc
variable does not have double quotes for any of the values ββ(for example, "Person": "Jack"
), it works fine.
However, if the object contains double quotes as such: "Person": ""Jack""
, it will send the object as NULL to the controller.
I am not sure why this is happening.
Should I do something special in this case?
source share