✅ Deserialize JSON back into custom object
Hey all,
I have an ObservableCollection that I am using to store a list of tasks (A custom object "TaskItem" that is build like this.
And in my ViewModel I'm creating an ObservableCollection of those item types, called "TaskList".
I am exporting that list of TaskItems to Json and that works fine with the below:
But I can't seem to work out how the hell I load that back into TaskList variable when I re-open the app.
I have been messing around with this in the ViewModel constructor:
Trieda bunch of different stuff in there, this was just what I gave up on haha.
Am I at least getting close? haha.
I have an ObservableCollection that I am using to store a list of tasks (A custom object "TaskItem" that is build like this.
And in my ViewModel I'm creating an ObservableCollection of those item types, called "TaskList".
I am exporting that list of TaskItems to Json and that works fine with the below:
But I can't seem to work out how the hell I load that back into TaskList variable when I re-open the app.
I have been messing around with this in the ViewModel constructor:
Trieda bunch of different stuff in there, this was just what I gave up on haha.
Am I at least getting close? haha.