title: Configure Json.net to URL encode certain field
body: <p>Say I have a model class like this:</p>
  
  <pre><code>public class MyModelClass
  {
      [JsonProperty("first_field"]
      public string FirstField { get; set; }
  
      [JsonProperty("second_field"]
      public string SecondField { get; set; }
  
      public MyModelClass(string first, string second)
      {
          FirstField = first;
          SecondField = second;
      }
  }
  </code></pre>
  
  <p>and let's say I have an instance of this type:</p>
  
  <pre><code>var myObject = new MyModelClass("blablabla", "&lt;&gt;@%#^^@!%");
  </code></pre>
  
  <p>When I convert this object into a Json string using Json.net, I get something like: </p>
  
  <pre><code>{ 'first_field': 'blablabla', 'second_field': '&lt;&gt;@%#^^@!%' }
  </code></pre>
  
  <p>Is there a way to configure Json.net so that the content of 'SecondField' is URL encoded? Do I need to write my own custom converter or is there a simpler way?</p>