This sample uses T:Newtonsoft.Json.JsonObjectAttribute to serialize a class that implements T:System.Collections.Generic.IEnumerable`1 as a JSON object instead of a JSON array.
Sample