title: Custom JsonConverter as Attribute
body: <p>I am trying to figure out how to use a custom JsonConverter as an Attribute. The problem is that I cannot figure out how to get the FOO object within the converter.</p>
  
  <p>Example</p>
  
  <pre><code>[Newtonsoft.Json.JsonConverter(typeof(FOOConverter))]
  public interface IFOO
  {
      ...
  }
  
  
  public class FOOConverter : Newtonsoft.Json.JsonConverter
  {
      public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
      {
          var jobj = serializer.Deserialize&lt;JObject&gt;(reader);
          ...
          var foo = jobj.ToObject&lt;IFOO&gt;() // Calls the converter again?
      }
  }
  </code></pre>
  
  <p>The .ToObject() will run the converter again and cause a stack overflow, which makes sense since it looks at the attribute, but how can I get the IFOO object then?</p>
  
  <p>Edit: The WriteJson will be simular, but with JObject.FromObject(value);</p>
  
  <p>The usage needs to be flexible, for ex: some properties might be encrypted/encrypted during serialization, other times, there may be property values that needs to be cached. To think of a few use cases.</p>