我正在向.NET API发送JSON。
后端结构如下:
date
问题在于public class ImportData
{
public ImportData()
{
this.ActionList = new List<ApplicationVersionExecutableActionsDTO>();
this.ReqList = new List<ApplicationHardwareRequirementsDTO>();
this.BlockList = new List<ConfiguratorBlocksDTO>();
this.targetFileErrors = new List<Dictionary<string, string>>();
}
public List<ApplicationVersionExecutableActionsDTO> ActionList { get; set; }
public List<ApplicationHardwareRequirementsDTO> ReqList { get; set; }
public List<ConfiguratorBlocksDTO> BlockList { get; set; }
public List<Dictionary<string, string>> targetFileErrors { get; set; }
}
public class ImportConflict
{
public ImportData replaceLists { get; set; }
public ImportData addLists { get; set; }
public int appVersionID { get; set; }
}
我收到了空物品。
API方法:
List<Dictionary<string, string>> targetFileErrors
以下是json在发送之前的样子:
JSON不是图像:
[HttpPost]
public HttpResponseMessage ImportResolve(ImportConflict importResolve)