```c#
实体类:
public class Sim2Model
{
public int uid { get; set; }
public string password { get; set; }
public int templateId { get; set; }
public string extend { get; set; }
public string customId { get; set; }
public string time { get; set; }
public SimObj[] _params { get; set; }
}
public class SimObj
{
public string mobile { get; set; }
public string[] param { get; set; }
}
请求示例:
{
"uid": 123456,
"password": "d26a2abe1c51f401b37a14e400d33624f",
"templateId": 12365,
"extend": "86985",
"customId": "121",
"time":"2020-01-03 08:08:08",
"params": [{
"mobile": "15236521425",
"param": ["tom", "上海"]
},
{
"mobile": "15298741547",
"param": ["cat", "北京"]
}
]
}
```
string就好了
string.split(',')就行了
params 也要定义实体 完全按照json 格式定义实体 ,用控制器实体接收 试一下
json都显示出来了,看json的格式就是和你的实体是对应的(所以前端就应该考虑转成这样的json格式)。所以你控制器接收的实体打个断点,看赋值对了没有。
你示例的数据十json 只需解码到 Sim2Model 即可