I have an ObservableCollection that I am using to store a list of tasks (A custom object "TaskItem" that is build like this.
internal class TaskItem { public string Task { get; set; } public string Description { get; set; } public string Date { get; } public TaskItem() { Date = DateTime.Now.ToString("hh:mmtt dd/MMM/yyyy"); } }
internal class TaskItem { public string Task { get; set; } public string Description { get; set; } public string Date { get; } public TaskItem() { Date = DateTime.Now.ToString("hh:mmtt dd/MMM/yyyy"); } }
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: