Explorar o código

Result now sets nodes as leafs where needed

Piotr Czajkowski %!s(int64=3) %!d(string=hai) anos
pai
achega
8626e5e4ef
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      AnalyzeStructure.cs

+ 6 - 0
AnalyzeStructure.cs

@@ -62,6 +62,12 @@ namespace analyzeJSON
         {
             get
             {
+                foreach (var node in nodes)
+                {
+                    if (leafs.ContainsKey(node.Key))
+                        nodes[node.Key] = node.Value with { IsLeaf = true };
+                }
+
                 return new(nodes, leafs);
             }
         }