Skip to content

BigDiffy should report nested unordered keys that are compared #329

Description

@idreeskhan

If you have a record that contains multiple nested unordered fields, it can be difficult when looking at the output to triage and trace which specific nested keys caused differences. We should provide this in the output report.

For example if your record looks something like:

{
  "name": "Artist"
  "fields": [
    {"name": "gid", "type": "string"}
    {
      "name": "Albums"
      "type": "array", "items": [{
        "type": "record"
        "name": "Album"
        "fields": [
           {"name": "gid", "type": "string"}
           {"name": "tracks", "type": {"type": "array", "items": [{
            "type": "record"
            "name": Track"
            "fields": [
             {"name": "gid", "type": "string"}
             {"name": "name", "type": "string"] 
           ] 
          }]
        ]
      }]
    }
  ]
}

Right now if you were to diff Artist1 and Artist2 and a diff was found in the track names the only Key that would be output is the root key (artist gid) but its useful for debugging further evaluating a diff if all of the keys would be provided. In this case the album gid and track gid as well.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions