How can I make Json.NET serializer to serialize IDictionary<,>IDictionary<,> instance into array of objects with key/value properties?
By default it serializes the value of Key into JSON object's property name.
Basically I need something like this:
[{"key":"some key","value":1},{"key":"another key","value":5}]
instead of:
{{"some key":1},{"another key":5}}
I tried to add KeyValuePairConverterKeyValuePairConverter to serializer settings but it has no effect. (I found this converter is ignored for type of IDictionaryIDictionary<> but I cannot easily change the type of my objects as they are received from other libraries, so changing from IDictionary<>IDictionary<> to ICollection<KeyValuePair<>>ICollection<KeyValuePair<>> is not option for me.)