WriteJson1 [C#] WriteJson (Json.Net) //I would recommend Json.Net, see example below: List _data = new List(); _data.Add(new data() { Id = 1, SSN = 2, Message = "A Message" }); string json = JsonConvert.SerializeObject(_data.ToArray()); //write string to file System.IO.File.WriteAllText(@"D:\path.txt", json); //Or the slightly more efficient version of the above code (doesn't use a string as a buffer): //open file stream using (Str.. 2020. 9. 11. 이전 1 다음