public object postDate(DateTime start)
{
//Save the DateTime to sql Server
//return success code or object
}
json字符串如何发布DateTime?
答案 0 :(得分:0)
创建一个对象并将其包装为:
Public class SampleModel
{
Public DateTime Start {get; set;}
}
然后将其发布到Action:
public object postDate(SampleModel sampleModel)
{
// sampleModel.Start
//Save the DateTime to sql Server
//return success code or object
}
JSON必须是这样的:
{
"Start":"2017-05-11T09:18:54.092Z"
}