如果响应包含字段System.AreaPath(包含点),如何反序列化JSON响应

时间:2018-08-01 07:23:40

标签: c# asp.net json rest json.net

如果响应包含字段System.AreaPath(包含点),则如何反序列化JSON响应。既然如此,我无法使用.NET中的成员System.AreaPath创建类。

{
  "count": 1,
  "value": [
    {
      "id": 297,
      "rev": 1,
      "fields": {
        "System.AreaPath": "Fabrikam-Fiber-Git",
        "System.TeamProject": "Fabrikam-Fiber-Git",
        "System.IterationPath": "Fabrikam-Fiber-Git",
        "System.WorkItemType": "Product Backlog Item",
        "System.State": "New",
        "System.Reason": "New backlog item",
        "System.CreatedDate": "2014-12-29T20:49:20.77Z",
        "System.CreatedBy": "Jamal Hartnett ",
        "System.ChangedDate": "2014-12-29T20:49:20.77Z",
        "System.ChangedBy": "Jamal Hartnett ",
        "System.Title": "Customer can sign in using their Microsoft Account",
        "Microsoft.VSTS.Scheduling.Effort": 8,
        "WEF_6CB513B6E70E43499D9FC94E5BBFB784_Kanban.Column": "New",
        "System.Description": "Our authorization logic needs to allow for users with Microsoft accounts (formerly Live Ids) - http://msdn.microsoft.com/en-us/library/live/hh826547.aspx"
      },
      "url": "https://fabrikam.visualstudio.com/_apis/wit/workItems/297"
    }
]
}

1 个答案:

答案 0 :(得分:1)

[JsonProperty("System.AreaPath")]标记属性