How to export an object as json file in C#
Valérie Gelbgras
Member, Employee Posts: 157
✭✭✭✭
Answers
-
Here is an example
using (StreamWriter file = File.CreateText(@"c:\test.json")) { JsonSerializer serializer = new JsonSerializer(); serializer.Serialize(file, modelObject); }
2