2016-08-01 185 views
1

我在服務標題中傳遞一個像這樣的字符串。無效的屬性標識符字符:\。路徑'',第1行,郵遞員的位置1

FormData = "{\"LeaveEntryCode\":0,\"RequestId\":0,\"EmployeeCode\":17227,\"LeaveYear\":2016,\"LeaveTypeCode\":1,\"BaseType\":\"ess\",\"StartDate\":\"2016-08-2T00:00:00\",\"EndDate\":\"2016-08-2T00:00:00\",\"NoOfDays\":1.0,\"StartDateSession\":\"full\",\"EndDateSession\":\"half\",\"PreApproved\":false,\"ForDate\":\"1901-01-01T00:00:00\",\"Remarks\":\"Test\",\"RequestStatus\":\"P\",\"Deleted\":false,\"Status\":false,\"CreatedBy\":0,\"CreatedDate\":\"0001-01-01T00:00:00\",\"UpdatedBy\":0,\"UpdatedDate\":\"0001-01-01T00:00:00\",\"DeletedBy\":0,\"DeletedDate\":\"0001-01-01T00:00:00\",\"ModuleId\":2,\"ObjectId\":20,\"StartDateString\":\"08/2/2016\",\"EndDateString\":\"08/2/2016\",\"LeaveDayList\":[\"08/02/2016-FH,08/02/2016-SH\"],\"SystemLeaveTypeCode\":\"ANN\",\"LeaveTypeName\":\"ANNUAL\",\"Employee\":\"\",\"LieuDayList\":null,\"LeaveReasonCode\":0,\"CoveringPersonCode\":0,\"AttachedDocument\":null,\"BaseLeaveType\":\"ANN\",\"CoveringPersonName\":null,\"LeaveReasonName\":null,\"DocumentSource\":\"LEAVE\"}"; 

這是FormData是標題名稱。 但我得到的postman

"Message": "An error has occurred.", 
    "ExceptionMessage": "Invalid property identifier character: \\. Path '', line 1, position 1.", 
    "ExceptionType": "Newtonsoft.Json.JsonReaderException", 
    "StackTrace": " at Newtonsoft.Json.JsonTextReader.Pars 

,這是什麼的振振有辭這個錯誤? 請幫幫我。 謝謝

+0

選擇類型爲raw和Json格式並嘗試 – Prashant

回答

0

選擇類型爲原始和內容作爲JSON和複製下面的json在正文中。

{ 
"LeaveEntryCode": 0, 
"RequestId": 0, 
"EmployeeCode": 17227, 
"LeaveYear": 2016, 
"LeaveTypeCode": 1, 
"BaseType": "ess", 
"StartDate": "2016-08-2T00:00:00", 
"EndDate": "2016-08-2T00:00:00", 
"NoOfDays": 1.0, 
"StartDateSession": "full", 
"EndDateSession": "half", 
"PreApproved": false, 
"ForDate": "1901-01-01T00:00:00", 
"Remarks": "Test", 
"RequestStatus": "P", 
"Deleted": false, 
"Status": false, 
"CreatedBy": 0, 
"CreatedDate": "0001-01-01T00:00:00", 
"UpdatedBy": 0, 
"UpdatedDate": "0001-01-01T00:00:00", 
"DeletedBy": 0, 
"DeletedDate": "0001-01-01T00:00:00", 
"ModuleId": 2, 
"ObjectId": 20, 
"StartDateString": "08/2/2016", 
"EndDateString": "08/2/2016", 
"LeaveDayList": ["08/02/2016-FH,08/02/2016-SH"], 
"SystemLeaveTypeCode": "ANN", 
"LeaveTypeName": "ANNUAL", 
"Employee": "", 
"LieuDayList": null, 
"LeaveReasonCode": 0, 
"CoveringPersonCode": 0, 
"AttachedDocument": null, 
"BaseLeaveType": "ANN", 
"CoveringPersonName": null, 
"LeaveReasonName": null, 
"DocumentSource": "LEAVE" 
} 
相關問題