我需要将代码段存储为对象的一部分,如何存储它。.
下面是JSON示例:
{
"codesamplevalue": "$.ajax({url: _spPageContextInfo.webAbsoluteUrl\"_api/web/lists/GetByTitle('companyInfo')/items?$select=Company,Industrytype:typedata:dataheaders:{Accept:\"application/json;odata=verbose\"Content-Type:\"application/json;odata=verbose\"X-RequestDigest:\"$(#__REQUESTDIGEST).val()\"IF-MATCH:\"*\"X-HTTP-Method:\null\n}cache:falsesuccess:function(data){console.log(\"successfull data get\")}error:function(data){console.log(\"failure of the rest call\")});",
"codecategory": "GetItems",
"programmingcategory": "Rest Api",
"methodtype": null
}