Umh, afaik that's not possible. I don't know your reasons for why you can't use REST, but you could try looking into the onExecutingWebRequest
etc on the SP.ClientContext
object and abort the initial request, and then do your own request with the payload JSOM have generated. Never used it like that myself, but I have a simple example of what I'm talking about that you could play around with:
(function() {
var ctx = SP.ClientContext.get_current();
var list = ctx.get_web().get_lists().getByTitle("ListTitle");
var items = list.getItems(SP.CamlQuery.createAllItemsQuery());
ctx.load(items, "Include(ID, Title)");
// abort the request
ctx.set_requestTimeout(1);
ctx.onExecutingWebRequest = function(webRequest,e) {
console.log(webRequest)
var waitForExecutor = setInterval(function() {
if(typeof webRequest.get_webRequest() != null) {
clearInterval(waitForExecutor);
$.ajax({
url: webRequest.get_webRequest().get_url(),
data: webRequest.get_webRequest().get_body(),
type: "POST",
headers: {
"Content-Type": webRequest.get_webRequest().get_headers()["Content-Type"],
"X-RequestDigest": webRequest.get_webRequest().get_headers()["X-RequestDigest"]
},
success: function(data) {
console.log(data)
if(data.length) {
var collection = data.filter(function(item) {
if(item._ObjectType_ === "SP.ListItemCollection") {
return item._Child_Items_;
}
});
if(collection.length) {
var json = JSON.stringify(collection[0]._Child_Items_);
console.log(json);
}
}
},
error: function(err) {
console.log("ERR")
}
});
}
},10);
}
ctx.executeQueryAsync( function() {
console.log("Should not enter this function")
}, function(s,a) {
console.log("Should enter if aborted");
console.log(a.get_message())
});
})();