diff --git a/src/cfgnet/plugins/file_type/json_plugin.py b/src/cfgnet/plugins/file_type/json_plugin.py index 1a84ee8..5dcee67 100644 --- a/src/cfgnet/plugins/file_type/json_plugin.py +++ b/src/cfgnet/plugins/file_type/json_plugin.py @@ -127,7 +127,6 @@ def _parse_json_object( if not isinstance(parent, ArtifactNode): name = json_object value = ValueNode(name=name) - parent.add_child(value) @staticmethod @@ -139,5 +138,8 @@ def _get_line_number(lines_dict: Dict, name: str) -> str: :param: name: name of option :return: line number of option """ - line = next(filter(lambda x: f'"{name}"' in x, lines_dict.keys())) - return lines_dict[line] + try: + line = next(filter(lambda x: f'"{name}"' in x, lines_dict.keys())) + return lines_dict[line] + except StopIteration: + return "None"