public override object Deserialize(IDictionary<string, object> dictionary, Type type, JavaScriptSerializer serializer) { return dictionary.ToDictionary(item => item.Key, item => { var d = (item.Value as Dictionary<string, object>); var range = new ApiRange { Min = Convert.ToDouble(d["min"]), Max = Convert.ToDouble(d["max"]) }; return range; }); }
public override object Deserialize(IDictionary <string, object> dictionary, Type type, JavaScriptSerializer serializer) { return(dictionary.ToDictionary(item => item.Key, item => { var d = (item.Value as Dictionary <string, object>); var range = new ApiRange { Min = Convert.ToDouble(d["min"]), Max = Convert.ToDouble(d["max"]) }; return range; })); }