title: Additional information: Error converting value [string] to type [enum]
body: <p>I am receiving this error whenever I try to deserialize the json string below:  </p>
  
  <p><strong>Error:</strong></p>
  
  <blockquote>
    <p>Additional information: Error converting value
    "invalid_request_error" to type 'ErrorType'. Path 'type', line 2,
    position 33.</p>
  </blockquote>
  
  <p><strong>Json string</strong>  </p>
  
  <pre><code>{
    "error": {
      "type": "invalid_request_error",
      "message": "Invalid request (check that your POST content type is application/x-www-form-urlencoded). If you have any questions, we can help at https://support.stripe.com/."
    }
  }  
  </code></pre>
  
  <p><strong>Code</strong>  </p>
  
  <pre><code>private void btnDeserialize_Click(object sender, EventArgs e)
  {
      var r = Components.JsonMapper.MapFromJson&lt;Components.DTO.Error&gt;(txtToDeserialize.Text, "error");
      txtDeserialized.Text = JsonConvert.SerializeObject(r);
  }  
  </code></pre>
  
  <p><strong>JsonMapper</strong>  </p>
  
  <pre><code>public static class JsonMapper
  {
      public static T MapFromJson&lt;T&gt;(string json, string parentToken = null)
      {
          var jsonToParse = string.IsNullOrEmpty(parentToken) ? json : JObject.Parse(json).SelectToken(parentToken).ToString();
  
          return JsonConvert.DeserializeObject&lt;T&gt;(jsonToParse);
      }
  }  
  </code></pre>
  
  <p><strong>Enum</strong></p>
  
  <pre><code>public enum ErrorCode
  {
      Default,
  
      [JsonProperty("invalid_number")]
      InvalidNumber,
  
      [JsonProperty("invalid_expiry_month")]
      InvalidExpiryMonth,
  
      [JsonProperty("invalid_expiry_year")]
      InvalidExpiryYear,
  
      [JsonProperty("invalid_cvc")]
      InvalidCvc,
  
      [JsonProperty("incorrect_number")]
      IncorrectNumber,
  
      [JsonProperty("expired_card")]
      ExpiredCard,
  
      [JsonProperty("incorrect_cvc")]
      IncorrectCvc,
  
      [JsonProperty("incorrect_zip")]
      IncorrectZip,
  
      [JsonProperty("card_declined")]
      CardDeclined,
  
      [JsonProperty("missing")]
      Missing,
  
      [JsonProperty("processing_error")]
      ProcessingError
  }
  
  public enum ErrorType
  {
      Default,
  
      [JsonProperty("api_connection_error")]
      ApiConnectionError,
  
      [JsonProperty("api_error")]
      ApiError,
  
      [JsonProperty("authentication_error")]
      AuthenticationError,
  
      [JsonProperty("card_error")]
      CardError,
  
      [JsonProperty("invalid_request_error")]
      InvalidRequestError,
  
      [JsonProperty("rate_limit_error")]
      RateLimitError
  }
  </code></pre>
  
  <p>I want to stick on using Enums rather than string.<br>
  What could be the good workaround for this?</p>