---
agentTools:
  projectIndex: https://docs.agilite.io/llms.txt
---

# /jsonDiff

Compares JSON and returns the differences

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Agilit-e Utils",
    "version": "7"
  },
  "servers": [
    {
      "url": "https://api.agilite.io/utils"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "api-key"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/jsonDiff": {
      "post": {
        "summary": "/jsonDiff",
        "description": "Compares JSON and returns the differences",
        "operationId": "jsondiff",
        "parameters": [
          {
            "name": "log-profile-key",
            "in": "header",
            "description": "Profile Key of the Batch Logging Profile configured for logging",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "data"
                ],
                "properties": {
                  "data": {
                    "type": "array",
                    "description": "Array of JSON Objects to compare",
                    "items": {
                      "properties": {
                        "srcJson": {
                          "type": "object",
                          "description": "Source JSON to compare"
                        },
                        "desJson": {
                          "type": "object",
                          "description": "Destination JSON to compare"
                        }
                      },
                      "required": [
                        "srcJson",
                        "desJson"
                      ],
                      "type": "object"
                    }
                  }
                }
              },
              "examples": {
                "Request Example": {
                  "value": {
                    "data": [
                      {
                        "srcJson": {
                          "name": "John Doe"
                        },
                        "desJson": {
                          "name": "Jane Doe"
                        }
                      },
                      {
                        "srcJson": {
                          "color": "blue"
                        },
                        "desJson": {
                          "color": "red"
                        }
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "[\n    [\n        {\n            \"kind\": \"E\",\n            \"path\": [\n                \"name\"\n            ],\n            \"lhs\": \"John Doe\",\n            \"rhs\": \"Jane Doe\"\n        }\n    ],\n    [\n        {\n            \"kind\": \"E\",\n            \"path\": [\n                \"color\"\n            ],\n            \"lhs\": \"blue\",\n            \"rhs\": \"red\"\n        }\n    ]\n]"
                  }
                },
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "example": "E"
                        },
                        "path": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "example": "name"
                          }
                        },
                        "lhs": {
                          "type": "string",
                          "example": "John Doe"
                        },
                        "rhs": {
                          "type": "string",
                          "example": "Jane Doe"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"statusCode\": 400,\n    \"errorMessage\": \"An Error Occurred\",\n    \"additionalMessages\": [\"An Error Occured\"]\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "statusCode": {
                      "type": "integer",
                      "example": 400,
                      "default": 0
                    },
                    "errorMessage": {
                      "type": "string",
                      "example": "An Error Occurred"
                    },
                    "additionalMessages": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "example": "An Error Occured"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "_id": "5fc0c5ba525f16005dcefb98:63987d264523bf00380d7b31"
}
```