Using ASP.NET 4.0 C#, how would I be able to change the serialization of a list containing name/value object into a JSON object that is of the format:
{
name:value,
name1:value1,
name2:value2
}
Instead of
{
{name:name, value:value},
{name:name1, value:value1},
{name:name2, value:value2}
}
The name/value object in the dictionary is dynamic in terms of the keys that will exist inside. One workarounds would be to create custom object which will have the explicit properties available - However this approach is not scalable, therefore this question :)
Thanks.