passing ?? in ajax web service call
I cannot pass ?? as data in a JSON object to a web service. One ? will save - two (??) will not. Code is this
Code:function submitAjax(strService, objWebParam, sender, fncFinished) {
var objSubmit = {};
mergeObjects(objSubmit, objWebParam);
clearWebParam(objSubmit);
var strWebParam = $.toJSON(objSubmit);
$.ajax({
type: "POST",
url: "WebService.asmx/" + strService,
dataType: "json",
data: strWebParam,
contentType: "application/json; charset=utf-8",
success: function(msg) {
fncFinished(msg, sender, objWebParam);
},
failure: function(msg) {
fncFinished(msg, "failure", objWebParam);
},
error: function(msg) {
fncFinished(msg, "error", objWebParam);
}
});
}
It breaks at error: - and msg looks like...
The readyState is coming back as a 4 and the statusText is coming back as "parseerror"
Interestingly I'm passing in "a??" as the data
AdjNote "a??"
- and the "parseerror" is coming back with the "a??" changed to
"AdjNote\":\"ajQuery152049188124233372654_1328136774279\"