Commit 9f915cda by mahaisong

fix: 输出JSON

parent 7ceb88eb
......@@ -707,11 +707,17 @@ namespace CsvCount_ES
ResultItem tempitem = new ResultItem();
ResultQueue.TryDequeue(out tempitem);
string returnstr;
//将result结果放入到集合中。统一转为json字符串,写入文件。
if (ResultQueue.Count >0)
{
returnstr = JsonConvert.SerializeObject(tempitem) + ",";
}
else
{
returnstr = JsonConvert.SerializeObject(tempitem) ;
string returnstr = JsonConvert.SerializeObject(tempitem) + ",";
}
sw.Write(returnstr);
sw.Flush();
sw.Close();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment