Newtonsoft JSON - How to use the JsonConverter.ReadJson method to convert types when deserializing JSON
<p>I need help understanding how to use the the JsonConverter.ReadJson method to convert a value of any number of types (string, boolean, Date, int, array, object) to a specific custom type.</p>

<p>For example, I have the following;</p>

<pre><code>    public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
    {   
       //where reader.Value could be a string, boolean, Date, int, array, object
       //and in this example the value of reader.Value is a string
        return new MyCustomType(reader.Value);
    }
</code></pre>

<p>But this gives error;</p>

<pre><code>Compilation error (line 115, col 36): Argument 1: cannot convert from 'object' to 'string'
</code></pre>

<p>I'm a bit green with C#, just need help making this work.</p>