Skip to content

(Colored) View: Do not show unchanged keys in changed dictionaries #568

@ubmarco

Description

@ubmarco

Is your feature request related to a problem? Please describe.
I have 2 huge root dictionaries (40k keys) and want to run a single comparison on them.
Only a couple of keys commonly differ. I want to generate a colored output (or other formats such as .md or html in future) only for the changed keys.
If I generate the view for the root dictionaries, I get a huge lot of unchanged keys reported that users are not interested in:

{
  "xxx": {
    "type": "something",
    "status": "other" -> "active",
  },
  "yyy": {...},
  "yyy1": {...},
  "yyy2": {...},
  "yyy3": {...},
  "yyy4": {...},
}

Can I exclude unchanged root keys already now? If not, is there a mechanism for custom views / report types?

Describe the solution you'd like
For dictionary comparisons, generate views that exclude unchanged root keys from the report/view.

Describe alternatives you've considered

  • Run the comparison multiple times, first for the root dictionaries to find changed keys, then individual diffs on those. That's a performance nightmare.
  • Post-process the colored output to textually filter the unchanged keys. That's bad engineering.
  • A new option to generate a view from a given diff result for a specific path in the result, that I can call for all changed root keys.
  • Build a custom report from a tree view on my side. Can do that, but would benefit from some guidance / best effort method.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions