title: Convert from json to Enum with Newtonsoft C#
body: <p>How could i deserialize json into a List of enum in C#? </p>
  
  <p>I wrote the following code: </p>
  
  <pre><code>  //json "types" : [ "hotel", "spa" ]
  
     public enum eType 
      {
        [Description("hotel")] 
        kHotel, 
        [Description("spa")]
        kSpa
      }
  
      public class HType 
      { 
         List&lt;eType&gt; m_types; 
  
          [JsonProperty("types")]
           public List&lt;eType&gt; HTypes { 
           get
            {
                 return m_types;
            } 
             set
            {
               // i did this to try and decide in the setter
               // what enum value should be for each type
               // making use of the Description attribute
               // but throws an exception 
            }
  </code></pre>
  
  <p>}
          }</p>
  
  <pre><code>       //other class 
  
                 var hTypes = JsonConvert.DeserializeObject&lt;HType&gt;(json);
  </code></pre>