Error processing request stream. JSON text specified is not valid

Error processing request stream. JSON text specified is not valid

I used this code
  1. function updateListItem(itemId, listName, siteUrl, title, success, failure) { var metatdata = "{ '__metadata': { 'type': 'SP.Data.TestListListItem' }, 'Title': "+title+"}" getListItemWithId(itemId, listName, siteUrl, function (data) { $.ajax({ url: data.__metadata.uri, dataType: "json", contentType: "application/json;odata=verbose", method: "POST", body: metatdata, headers: { "Accept": "application/json;odata=verbose", "X-RequestDigest": $("#__REQUESTDIGEST").val(), "Content-Length":metatdata.length, "X-HTTP-Method": "MERGE", "If-Match": "*" }, success: function (data) { alert("success in ajax"); console.log("Item in success ajax"); console.log(data); success(data); }, error: function (data) { alert("waiting for success in ajax"); console.log("Item in error ajax"); console.log(data); failure(data); } }); }, function (data) { failure(data); });
  2. when i checked it using console,it shows "Error processing request stream. JSON text specified is not valid",I think i can't read text from Json response and I tried lot.Please help me guys..Thanks in Advance