I am trying to update a JIRA issue using Visual Studio 2015, Microsoft Razor, and C# with Json.Net 10.0.2. The code is:
public String updateJiraIssue(object objJira2) {
JiraService.open("PUT", JiraUrl + "/rest/api/2/issue/NPI-24");
JiraService.setRequestHeader("Content-Type", "application/json");
JiraService.setRequestHeader("Accept", "application/json");
JiraService.setRequestHeader("X-Atlassian-Token", "nocheck");
JiraService.setRequestHeader("Authorization", "Basic " + GetEncodedCredentials());
var myJSON = Json.stringify(JiraJson);
JiraService.send(myJSON);
String response = JiraService.responseText;
JiraService.abort();
return response;
}
The error occurs in:
var myJSON = Json.stringify(JiraJson);
The JSON is:
string jsonString = @"{""fields"":{""customfield_12302"":{""name"":""xyz""}}}";
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…