using System.Collections.Generic;
using Newtonsoft.Json.Linq;
using System.Collections;
public static void Main()
bar.List = new List<Bar>() {
new Bar(){ Value = "Foo1" },
new Bar(){ Value = "Bar2" },
new Bar(){ Value = "Foo3" }
var json = JsonConvert.SerializeObject(bar, Formatting.Indented);
public Dictionary<string, JToken> Values
return List.Select((v, i) => new KeyValuePair<string, JToken>($"Property{i + 1}", JValue.CreateString(v.Value))).ToDictionary(kvp => kvp.Key, kvp => kvp.Value);
public string Value{ get; set; }