title: ASP.NET MVC: Controlling serialization of property names with JsonResult
body: <p>Is there a way to control the JSON output of <code>JsonResult</code> with attributes, similar to how you can use <code>XmlElementAttribute</code> and its bretheren to control the output of XML serialization?</p>
  
  <p>For example, given the following class:</p>
  
  <pre><code>public class Foo
  {
      [SomeJsonSerializationAttribute("bar")]
      public String Bar { get; set; }
  
      [SomeJsonSerializationAttribute("oygevalt")]
      public String Oygevalt { get; set; }
  }
  </code></pre>
  
  <p>I'd like to then get the following output:</p>
  
  <pre><code>{ bar: '', oygevalt: '' }
  </code></pre>
  
  <p>As opposed to:</p>
  
  <pre><code>{ Bar: '', Oygevalt: '' }
  </code></pre>