c# - JSON Serialization of Dictionary into name:value instead of {name:name, value:value} -


using asp.net 4.0 c#, how able change serialization of list containing name/value object json object of 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 dictionary dynamic in terms of keys exist inside. 1 workarounds create custom object have explicit properties available - approach not scalable, therefore question :)

thanks.

you implement custom javascriptconverter, you're in full control of serialization. or put properties idictionary , json , think come out in format you're after.


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -