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...

```
    public static void SaveState<T>(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<T>(string key)//loading data
    {
        var localSettings = ApplicationData.Current.LocalSettings;
        if (localSettings.Values.ContainsKey(key))//exception occurs on the below line
            return JsonConvert.DeserializeObject<T>(((string)localSettings.Values[key]));
        return default(T);
    }

```

and I use these methods as follows:-

```
    var files = StateService.LoadState<IReadOnlyList<StorageFile>>(Playlist);
    //StateService is the class which has these static methods...

```

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...