反序列化将datatable datetime列的数据类型更改为string。
services
.AddAuthentication(options=>{
options.DefaultAuthenticateScheme = "forbidScheme";
options.DefaultForbidScheme = "forbidScheme";
options.AddScheme<MyAuthenticationHandler>("forbidScheme", "Handle Forbidden");
});
型号:
Message message = (Message)JsonConvert.DeserializeObject(jsonDataMessage,typeof(Message));
JSON:
public class Message : Message
{
public List<MessageBody> MessageBody = new List<Models.MessageBody> ();
}
public class MessageBody
{
public DataTable Records = new DataTable();
}