Example model:
public class Thing
{
[JsonProperty("foo")]
public string Foo {get;set;}
[JsonProperty("bars")]
public Dictionary<string,string> Bars {get;set;}
}
i want the output to look like this:
{"foo":"Foo Value", "bars":{"key1":key1Value,"key2":key2Value}}
The reason I want the values of the Dictionary to be without quotes is so I can pull the value from the client via jquery:
{"foo":"Foo Value", "bars":{"key1":$('#key1').val(),"key2":$('#key2').val()}}
Is this possible using Json.Net?