using System.Collections.Generic; using Newtonsoft.Json.Linq; namespace EDJournal { public class FSDJumpEntry : Entry { protected override void Initialise() { SystemAddress = JSON.Value("SystemAddress") ?? 0; StarSystem = JSON.Value("StarSystem"); var faction = JSON.Value("SystemFaction"); if (faction != null) { SystemFaction = faction.Value("Name"); } JArray factions = JSON.Value("Factions"); if (factions != null) { foreach (JObject system_faction in factions) { Faction f = Faction.FromJSON(system_faction); if (f != null) { SystemFactions.Add(f); } } } } public string StarSystem { get; set; } public string SystemFaction { get; set; } public ulong SystemAddress { get; set; } public List SystemFactions { get; set; } = new List(); } }