using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; namespace iWareTestForm { public class JsonFileHelper { /// /// 读取json内容 /// /// /// public static string ReadJson(string path) { try { StreamReader sr = new StreamReader(path, Encoding.Default); String line; StringBuilder sb = new StringBuilder(); while ((line = sr.ReadLine()) != null) { sb.Append(line.ToString() + " \n"); } return sb.ToString(); } catch { throw; } } } }