title: Custom attribute handling in Json.Net
body: <p>My goal is to serialize properties that don't have any attributes and properties which have a specific custom attribute.</p>
  
  <p>For the following class:</p>
  
  <pre><code>public class Msg
  {
      public long Id { get; set; }
  
      [CustomAttributeA]
      public string Text { get; set; }
  
      [CustomAttributeB]
      public string Status { get; set; }
  }
  </code></pre>
  
  <p>When I call a method <code>Serialize(object, CustomAttributeA)</code>, I want to have the following output:</p>
  
  <pre><code>{
      "Id" : someId,
      "Text" : "some text"
  }
  </code></pre>
  
  <p>And when I call <code>Serialize(object, CustomAttributeB)</code>, I want to have following:</p>
  
  <pre><code>{
      "Id" : someId,
      "Status" : "some status"
  }
  </code></pre>
  
  <p>I have read that it's possible to achieve this by creating a custom <code>ContractResolver</code>, but in this case must I create two separate contract resolvers?</p>