Serialize an immutable collection |
This sample serializes an immutable collection into JSON.
ImmutableList<string> l = ImmutableList.CreateRange(new List<string> { "One", "II", "3" }); string json = JsonConvert.SerializeObject(l, Formatting.Indented); // [ // "One", // "II", // "3" // ]