C Sharp (C#) - File IO
What is wrong with this code snippet that tries to write an object to a JSON file?
using System.Text.Json;
using System.IO;
var person = new Person { Name = "Bob", Age = 25 };
File.WriteAllText("person.json", person.ToString());
public class Person {
public string Name { get; set; }
public int Age { get; set; }
}