title: UWP Json.Convert storage files
body: <p>I am making a UWP app in which I am trying to save storage files picked by user to the local settings by serializing them, and I want to deserialize them and use them again when I want to. it saves IReadOnlyList object to the local settings just fine, but at the time of deserializing it gives and exception, that this method cant return storage files because it doesnt have a constructor for this, something like this. I am posting the code of my both methods of saving and loading data. please see it and help me...</p>
  
  <pre><code>    public static void SaveState&lt;T&gt;(string key, T value)//save method
      {
          //key is provided by me so that i can use it to load the data later.
          var localSettings = ApplicationData.Current.LocalSettings;
          localSettings.Values[key] = JsonConvert.SerializeObject(value);
      }
  
      public static T LoadState&lt;T&gt;(string key)//loading data
      {
          var localSettings = ApplicationData.Current.LocalSettings;
          if (localSettings.Values.ContainsKey(key))//exception occurs on the below line
              return JsonConvert.DeserializeObject&lt;T&gt;(((string)localSettings.Values[key]));
          return default(T);
      }
  </code></pre>
  
  <p>and I use these methods as follows:-</p>
  
  <pre><code>    var files = StateService.LoadState&lt;IReadOnlyList&lt;StorageFile&gt;&gt;(Playlist);
      //StateService is the class which has these static methods...
  </code></pre>
  
  <p>Note: when i try to load data with a key which has no data against it in the local settings, it doesnt give any exception and just returns an empty list.but when its supposed to return a filled list of IReadOnlyList then it gives and exception...</p>