My custom object's one of properties is dictionary and I need to convert whole object to json string but JsonConvert changes dictionary key from Int to String which is what I don't want to happen.
var test = new Dictionary<int, string>
{
[1] = "2"
};
var jsonDictionary = JsonConvert.SerializeObject(test, Formatting.None);
// output {"1":"2"}
My desired output should be { 1 : "2" }