title: Customized JSON.NET converter that convert string to type
body: <p>So basically I have this class in c# that I want to deserialize to, Here is the class:</p>
  
  <pre><code>public class Data {
      public string Name{get;set;}
      public string Label{get;set;}
      public string Unit{get;set;}
      public int Precision{get;set;}
  
          [JsonPropertyAttribute("type")]
          public Type DataType{get;set;}
  }
  </code></pre>
  
  <p>And my Json String looks like this:</p>
  
  <pre><code>{
      "name": "ACCurrent",
      "label": "ACCurrent",
      "unit": "A",
      "precision": 2,
      "type": "float"
  }
  </code></pre>
  
  <p>But the I don't know how to write a custom converter to convert "float" to typeof(float). I saw the documentation and I think I need to work on the WriteJson method under converter. But I don't quite understand how I should do it. Any help would be appreciated!</p>