【发布时间】:2019-02-22 14:47:05
【问题描述】:
我被困住了。
我传递了一个简单的 json 对象,它工作正常。但我让它更复杂一点。在这种情况下,我的消息对象中的 fileInfo 对象遇到了麻烦。
收到时文件信息为空。我知道我必须忽略一些简单的事情。
这是我传递的 json 对象的示例。
提前致谢。
public class ContactUsInformation
{
public string name { get; set; }
public string company { get; set; }
public string email { get; set; }
public string phone { get; set; }
public string description { get; set; }
public IList<AttachmentInfo> fileInfo{ get; set; }
//public AttachmentInfo[] fileInfo { get; set; }
/*public string[] fileName { get; set; }
public string[] fileType{ get; set; }
public string[] fileValue { get; set; }*/
}
public class AttachmentInfo{
public string fileName { get; set; }
public string fileType { get; set; }
public string fileValue { get; set; }
}
public IEnumerable Contact([FromBody]ContactUsInformation[] contactUsInformation)
【问题讨论】: