我必须使用以下查询: 控制器/操作?query = {“action”:“test”,“id”:“13037313353”,“pin”:“452312” }通过GET获得 。如何通过查询字符串获取JSON对象
我的视图模型:
public class ValidatePinViewModel
{
public ActionType action { get; set; }
public int Id { get; set; }
public int Pin { get; set; }
}
控制器
public JsonResult ValidateVisit(CommonViewModel model)
{
//model is null
return Json(new InvalidPin());
}
现在,我对我的看法得到了空。我怎样才能得到正确的模型
是的,我与其他的服务,它通过GET发送这种类型的查询工作。 – 2013-04-29 17:24:50
然后其他服务是错误的。如果其他服务发布数据,则应使用POST。 – 2013-04-29 17:26:55
我知道。我不能改变它。我只能使用它。 – 2013-04-29 17:27:49