You can leverage REST interface available in URL
http://siteurl/_vti_bin/listdata.svc
Create
$.ajax({
url: "http://siteurl/_vti_bin/listdata.svc/listName",
type: "POST",
processData: false,
contentType: "application/json;odata=verbose",
data: JSON.stringify(data),
headers: {
"Accept": "application/json;odata=verbose"
},
success: function (data) {
alert("Created");
},
error: function (data) {
alert("Failed";
}
});
Update
$.ajax({
type: 'POST',
url: "http://siteurl/_vti_bin/listdata.svc/listName(1)", //1 is item id to update
contentType: 'application/json',
processData: false,
headers: {
"Accept": "application/json;odata=verbose",
"X-HTTP-Method": "MERGE"
},
data: JSON.stringify(data),
success: function (data) {
alert("Created");
},
error: function (data) {
failure(data);
}
});
Read
$.ajax({
url: "http://siteurl/_vti_bin/listdata/listName(1)",
method: "GET",
headers: { "Accept": "application/json; odata=verbose" },
success: function (data) {
alert(data.d);
},
error: function (data) {
alert('Failed');
}
});