title: Add fields to web api return object
body: <p>In controller I used to return json like this:</p>
  
  <pre><code>[System.Web.Http.HttpGet]
  
      public JsonResult GetData()
      {
       return Json(new { success = true, msg = "", result = myObject},   JsonRequestBehavior.AllowGet);
      }
  </code></pre>
  
  <p>Since extjs expect success message as part of json I had to add this to every response, and object with all data I usually add to result.</p>
  
  <p>Now I have web api. Here you have to define return type of some method as object and based on accept header the result will be json or xml(I had a lot of problems since IE doesn't send this header and I got always xml as return - but I solved this config formatters add):</p>
  
  <pre><code>public myObject GetData(){
      ...
      return myObject;
  }
  </code></pre>
  
  <p>It works. But now there is no {success = true, msg = ""} as part of returned json.
  How can I add this to be returned the same way as with controller?
  (without creating custom HttpContent class since it is ugly workaround).</p>
  
  <p>And at the end, does it have any sense to use web api at all and not use mvc controller-the old way?
  There are problems with accept headers, it is harder to test(I must simulate ajax call while with controller there is just url to call) and as it seems it is more work to get the appropriate json.
  The only benefit of web api as i see is to get different serialization to client based on accept header, but in reality there is no need to get other data than json(at least I don't need it). So, why not use mvc controller instead web api?</p>