title: 500 internal server error when sending a JSON object containing a Type field
body: <p>I have an issue to send an instance of this class as a JSON object:</p>
  
  <pre><code>class Temp
  {
      public String Name = "Foo";
      public Type type ;
  
  }
  </code></pre>
  
  <p>When if send an instance as a JSON object from a controller to a View via Ajax, I get a 500 internal server error.
  The culprit is the Type argument.
  If I set  type = null, the Ajax call succeeds.
  If type = something else (IE typeof(String)), Ajax call will fail with 500 error.
  I suppose that Type type cannot be properly serialized?</p>
  
  <p>On purpose to test this, I tried to make it non-serialized with NonSerializedAttribute attribute but it did not help:</p>
  
  <pre><code>[NonSerializedAttribute]
  public Type type = typeof(String);
  </code></pre>
  
  <p>Any idea to get this sorted?</p>
  
  <p>If relevant, the view is called this way:</p>
  
  <pre><code> JsonResult json = Json( new Temp(), "application/json; charset=utf-8", JsonRequestBehavior.AllowGet);
  return  json;
  </code></pre>