using System.Collections.Generic;
public string Name { get; set; } = "Test";
public List<string> Bars { get; set; } = [];
public string Name { get; set; } = "Test";
public List<string>? Bars { get; set; }
public static void Main()
var json = JsonSerializer.Serialize(foo);
var json2 = JsonSerializer.Serialize(foo2);
Console.WriteLine(json2);