Skip to content

Commit f7ab425

Browse files
NRL-1215 - Revert "NRL-1215 Remove commented-out code for duplicate detection in JSON arrays"
This reverts commit 2f2da7f.
1 parent 41000c3 commit f7ab425

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

layer/nrlf/core/json_duplicate_checker.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,12 @@ def traverse_array(self, items: JsonArray, path: list[str]) -> None:
9292
else:
9393
seen_elements.add(serialized_item)
9494

95+
# if item in seen_elements:
96+
# duplicate_path = f"{array_path}[{idx}]"
97+
# self.duplicate_keys_and_paths.setdefault(duplicate_path, []).append(f"{base_path[0]}.{duplicate_path}")
98+
# print(f"Found duplicate array element at path: {duplicate_path}")
99+
# else:
100+
# seen_elements.append(item)
95101
if not isinstance(item, (list, tuple)):
96102
continue
97103
self.process_collection(item, base_path, f"{array_path}[{idx}]")

0 commit comments

Comments
 (0)