JSON.parse()与JSON.stringify()的区别
JSON.parse()【从一个字符串中解析出json对象】
Demo:
//定义一个字符串
var data='{"Name":"张三","Age":"12"}'
//解析对象
JSON.parse(data)
结果是:
Name:"张三",Age:"12"
JSON.stringify()【从一个对象中解析出字符串】
var data='{"Name":"张三","Age":"12"}'
JSON.stringify(data)
结果是:
var data='{"Name":"张三","Age":"12"}'
/// <summary>
/// 执行调度方法
/// </summary>
/// <param name="context"></param>
public void Execute(IJobExecutionContext context)
{
log.Info(DateTime.Now.ToString() + ": 导出服务开始执行...");
List<ExportInfoModel> exportInfoModelList = new List<ExportInfoModel>();
string resMsg = GetExportQueue(out exportInfoModelList);
if (string.IsNullOrEmpty(resMsg))
{
//DeleteExportInfo();
Export();
}
else
{
log.Info(DateTime.Now.ToString() + resMsg);
}
log.Info(DateTime.Now.ToString() + ": 导出服务执行完成!");
if (context.NextFireTimeUtc != null)
{
DateTime dtNow = context.NextFireTimeUtc.Value.LocalDateTime;
log.Info("导出服务下次执行时间:" + dtNow.ToString());
}
}