title: Json.net serializationbinder for collections of custom type
body: <p>The JSON data I get from my API includes the types of the objects. I want to deserialize these types using a custom serialization binder. The namespaces stays, the assembly changes.</p>
  
  <pre><code>public class SerializationBinder : Newtonsoft.Json.SerializationBinder
  {
      // Type / Assembly Dictionary
      private Dictionary&lt;String, String&gt; KnownCoreTypes = new Dictionary&lt;string, string&gt;
      {
          {"My.Custom.NameSpace.Type", "Core" }
      };
  
      public override Type BindToType(string assemblyName, string typeName)
      {
          Type tmpTypeToDeserialize = null;
          string tmpActualValue;
          if (KnownCoreTypes.TryGetValue(typeName, out tmpActualValue) &amp;&amp; tmpActualValue == assemblyName)
          {
                assemblyName = typeof(SerializationBinder).GetTypeInfo().Assembly.FullName;
          }
  
          // The following line of code returns the type.
          tmpTypeToDeserialize = Type.GetType($"{typeName}, {assemblyName}");
  
          return tmpTypeToDeserialize;
      }
  }
  </code></pre>
  
  <p>But what if I have a collection of <code>My.Custom.NameSpace.Type</code>? </p>
  
  <p>How do I resolve <code>System.Collections.Generic.List'1[[My.Custom.NameSpace.Type, Core]], mscorlib</code>?</p>