using System.Collections.Generic; using Newtonsoft.Json.Linq; using System.Linq; namespace EDJournal { public class SellExplorationDataEntry : Entry { private List systems = new List(); private List discovered = new List(); public long BaseValue { get; set; } public long Bonus { get; set; } public long TotalEarnings { get; set; } public List Systems => systems; public List Discovered => discovered; protected override void Initialise() { BaseValue = JSON.Value("BaseValue") ?? 0; Bonus = JSON.Value("Bonus") ?? 0; TotalEarnings = JSON.Value("TotalEarnings") ?? 0; var sys = JSON.Value("Systems"); if (sys != null) { systems = sys.Select(x => x.ToString()).ToList(); } var dis = JSON.Value("Discovered"); if (dis != null) { discovered = dis.Select(x => x.ToString()).ToList(); } } } }