Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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);
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #create #json #file
ADD COMMENT
Topic
Name
2+1 =