using System.Text.Json.Serialization; namespace Pathfinding; public class PathResult { [JsonInclude]public TimeSpan calcTime; [JsonInclude]public List pathNodes; [JsonInclude]public double distance; [JsonInclude]public double weight; [JsonConstructor] public PathResult(TimeSpan calcTime, List pathNodes, double distance, double weight) { this.calcTime = calcTime; this.pathNodes = pathNodes; this.distance = distance; this.weight = weight; } }