using System.Text.Json.Nodes; namespace InnovEnergy.Lib.StatusApi; public record InstallationStatus : IInstallationStatus { public IDeviceStack[] Stacks { get; init; } public JsonNode ToJson() { /* var json = new Dictionary(); if (Stacks.Any()) { json[nameof(Stacks)] = new JsonArray(Stacks.Select(d => d.ToJson()).ToArray()); } return new JsonObject(json!);*/ return null; } }