Browse Source

Result now sets nodes as leafs where needed

Piotr Czajkowski 3 năm trước cách đây
mục cha
commit
8626e5e4ef
1 tập tin đã thay đổi với 6 bổ sung0 xóa
  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);
             }
         }