title: Json.net on deserialize change property type and name
body: <p>With json.net when I deserialize a json string, I need to map a json List to another field and convert type.</p>
  
  <p>To make it clear, I have this class (it's generated code and I can't change it):</p>
  
  <pre class="lang-cs prettyprint-override"><code>[Serializable]
  public partial class Nbgv
  {
      public virtual IReadOnlyList&lt;string&gt; BuildMetadataWithCommitId =&gt; BuildMetadataWithCommitIdInternal.AsReadOnly();
      internal List&lt;string&gt; BuildMetadataWithCommitIdInternal { get; set; } = new List&lt;string&gt;();
  }
  </code></pre>
  
  <p>I have this json string:</p>
  
  <pre class="lang-cs prettyprint-override"><code>string json = @"{
      ""BuildMetadataWithCommitId"": [
          ""c390a213b7""
      ]
  }";
  </code></pre>
  
  <p>As you can see <code>BuildMetadataWithCommitId</code> depends on <code>BuildMetadataWithCommitIdInternal</code>.</p>
  
  <p>I tried several things with a custom resolver but nothing worked. I did not find how to tell json.net if you find a property that is a generic list, map it to the field ending with *Internal.</p>
  
  <pre class="lang-cs prettyprint-override"><code>private class CustomContractResolver : DefaultContractResolver
  {
      protected override JsonProperty CreateProperty(MemberInfo member, MemberSerialization memberSerialization)
      {
          var property = base.CreateProperty(member, memberSerialization);
          property.Writable = true;
          if (IsList(property.PropertyType))
          {
              property.PropertyName += "Internal";
              property.PropertyType = ToList(property.PropertyType);
          }
  
          return property;
      }
  
      private Type ToList(Type t)
      {
          var genericListType = typeof(List&lt;&gt;);
          var specificListType = genericListType.MakeGenericType(t.GenericTypeArguments[0]);
          return specificListType;
      }
  
      private bool IsList(Type t)
      {
          if (t == null) return false;
  
          var res = t.IsGenericType &amp;&amp;
                     t.GetGenericTypeDefinition().IsAssignableFrom(typeof(IReadOnlyList&lt;&gt;));
  
          return res;
      }
  }
  </code></pre>