public string Put(int id, [FromBody] object value) { ResultObject result = new ResultObject(); if (value != null) { try { var question = JsonConvert.DeserializeObject <Question>(value.ToString()); question.Id = id; result.Success = service.Update(question); return(JsonConvert.SerializeObject(result)); } catch (Exception e) { result.Message = "EXCEPTION: " + e.Message + "Stack: " + e.StackTrace; return(JsonConvert.SerializeObject(result)); } } result.Message = "Null content"; return(JsonConvert.SerializeObject(result)); }