var person = new Person { name = "Имя", age = 18, date = "2024-03-07" }; string json = JsonConvert.SerializeObject( person, Formatting.Indented); Console.WriteLine(json);