I am using razor in webmatrix. I have a dictionary object
var occupancyTotalDic = new Dictionary<double, int>();
Once I have filled the dictionary with data I wish to output as JSON as a response to populate a flot chart
Dictionary<String, String> input = new Dictionary<String, String>();
occupancyTotalDic = input.ToDictionary(item => item.Key, item => (String)item.Value);
Response.ContentType = "application/json";
Response.Write(Json.Encode(occupancyTotalDic));
How do I convert my dictionary to contain strings so that I can output as JSON?