镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Feature Request: Option to Include Matched Values in DeepDiff Output #553

Open

Description

@jeetenp

Hi,
First off, thank you for building and maintaining such a powerful and useful tool — DeepDiff has become an integral part of our workflows for detecting changes between complex data structures.

I have a suggestion that might seem small, but could be quite impactful in many use cases:
Feature Proposal:
Currently, DeepDiff focuses solely on reporting the parts of the data that are different — which is great. However, in some scenarios, it would be extremely helpful if we could also retrieve the levels or paths where values matched between the two structures.

This could be implemented as an optional feature — for example:
DeepDiff(obj1, obj2, include_matched_values=True)

Benefits:
Allows users to build complete diff+match reports.

Useful for visual comparison tools, logging, data synchronization, or data auditing.

Enables post-processing and understanding of not just what changed, but also what remained the same — important in many traceability and testing scenarios.

Suggested Implementation (idea-level):
If include_matched_values=True, DeepDiff could include a new key in its output, e.g., "matched_values" (or "matched_paths"), listing the object paths that were checked and found to be equal.

This would be disabled by default to preserve performance and output size for current users.

Again, thank you for your work on this great library. I hope this idea is helpful and worth considering!

Activity

  1. Hazedd commented on Jun 19, 2025

    @Hazedd

    +1

    Related #481

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions