creating a json file code example
Example 1: how to create json file in c#
//open file stream
using (StreamWriter file = File.CreateText(@"D:\path.txt"))
{
JsonSerializer serializer = new JsonSerializer();
//serialize object directly into file stream
serializer.Serialize(file, _data);
}
Example 2: js create json from object
JSON.stringify(the_data);