https://stackoverflow.com/questions/53391878 - Version 1

CSharp · Console

/Program.cs

using System;
using System.Collections.Generic;
using Newtonsoft.Json;
					
public class Program
{
	public static void Main()
	{
		List<Person> people = new List<Person>
		{
			new Person { Name = "Joe Schmoe" }
		};
		string json = JsonConvert.SerializeObject(people);
		Console.WriteLine(json);
	}
}

public class Person
{
	public string Name { get; set; }
}
;