title: StackOverflow exception when using custom JsonConverter and custom ContractResolver
body: <p>My requirement is use JsonProperty during de-serializing and ignore JsonProperty during serialization. My model,</p>
  
  <pre><code>[JsonConverter(typeof(JsonPathConverter))]
  public class FacebookFeed
  {
      public FacebookFeed()
      {
          Posts = new List&lt;FacebookFeedPost&gt;();
      }
  
      [JsonProperty("name")]
      public string Name { get; set; }
  
      [JsonProperty("fan_count")]
      public int Likes { get; set; }
  
      [JsonProperty("feed.data")]
      public List&lt;FacebookFeedPost&gt; Posts { get; set; }
  }
  
  public class FacebookFeedPost
  {
      [JsonProperty("id")]
      public string Id { get; set; }
  
      [JsonProperty("message")]
      public string Message { get; set; }
  
      [JsonProperty("created_time")]
      public DateTime Date { get; set; }
  
      [JsonProperty("comments.summary.total_count")]
      public int Comments { get; set; }        
  }
  
  class IgnoreJsonPropertyContractResolver : DefaultContractResolver
  {
      protected override IList&lt;JsonProperty&gt; CreateProperties(Type type, MemberSerialization memberSerialization)
      {
          var list = base.CreateProperties(type, memberSerialization);
          foreach (JsonProperty prop in list)
          {
              prop.PropertyName = prop.UnderlyingName;
          }
          return list;
      }
  }
  
  public class JsonPathConverter : JsonConverter
  {
      public override object ReadJson(JsonReader reader, Type objectType,
                                      object existingValue, JsonSerializer serializer)
      {
          var jo = JObject.Load(reader);
          object targetObj = Activator.CreateInstance(objectType);
  
          foreach (var prop in objectType.GetProperties()
                                                  .Where(p =&gt; p.CanRead &amp;&amp; p.CanWrite))
          {
              var att = prop.GetCustomAttributes(true).OfType&lt;JsonPropertyAttribute&gt;().FirstOrDefault();
              var jsonPath = (att != null ? att.PropertyName : prop.Name);
              var token = jo.SelectToken(jsonPath);
              if (token != null &amp;&amp; token.Type != JTokenType.Null)
              {
                  var value = token.ToObject(prop.PropertyType, serializer);
                  prop.SetValue(targetObj, value, null);
              }
          }
  
          return targetObj;
      }
  
      public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
      {
          var s = new JsonSerializer();
          serializer.ContractResolver = new IgnoreJsonPropertyContractResolver();
          var t = JToken.FromObject(value, s);
          t.WriteTo(writer);
      }
  
      public override bool CanConvert(Type objectType)
      {
          // CanConvert is not called when [JsonConverter] attribute is used
          return false;
      }
  
      public override bool CanWrite
      {
          get { return true; }
      }
  
   }
  </code></pre>
  
  <p>The problem is WriteJson. Note that I am using ASP.NET Web Api which internally serialize my objects that's why I am using JsonConverter. I dont wanna change global web api settings.</p>