public JsonResult EditDevice(string val) { var JSONObj = new JavaScriptSerializer().Deserialize <Dictionary <string, string> >(val); IDevice dev = getDeviceFromJson(JSONObj); return(Json(adapter.EditDevice(dev))); }