Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Write JSON file C#

using System.Text.Json;
using System.Text.Json.Serialization;

List<data> _data = new List<data>();
_data.Add(new data()
{
    Id = 1,
    SSN = 2,
    Message = "A Message"
});

string json = JsonSerializer.Serialize(_data);
File.WriteAllText(@"D:path.json", json);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Write #JSON #file
ADD COMMENT
Topic
Name
4+8 =