Some custom types that implement IEnumerable don\'t necessarily have backing collections. They could be generated dynamically, for example using \'yield\' or LINQ. Here is a
Answered my own question - see the excellent documentation on IEnumerable, Lists, and Arrays:
.NET lists (types that inherit from IEnumerable) and .NET arrays are converted to JSON arrays. Because JSON arrays only support a range of values and not properties, any additional properties and fields declared on .NET collections are not serialized. In situations where a JSON array is not wanted the JsonObjectAttribute can be placed on a .NET type that implements IEnumerable to force the type to be serialized as a JSON object instead.
So, for my example:
[JsonObject]
public class MyCustomEnumerable : IEnumerable<KeyValuePair<int,float>>
{
...
}