diff
Compare text or data in various formats like JSON, YAML, XML, and HTML to generate a readable or structured difference output for analysis or debugging.
Instructions
compare text or data and get a readable diff
Input Schema
Name | Required | Description | Default |
---|---|---|---|
state | Yes |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"state": {
"additionalProperties": false,
"properties": {
"left": {
"anyOf": [
{
"anyOf": [
{
"type": "string"
},
{
"additionalProperties": {},
"type": "object"
}
]
},
{
"items": {},
"type": "array"
}
],
"description": "The left side of the diff."
},
"leftFormat": {
"default": "json5",
"description": "format of left side of the diff",
"enum": [
"text",
"json",
"json5",
"yaml",
"toml",
"xml",
"html"
],
"type": "string"
},
"outputFormat": {
"default": "text",
"description": "The output format. text: (default) human readable text diff, json: a compact json diff (jsondiffpatch delta format), jsonpatch: json patch diff (RFC 6902)",
"enum": [
"text",
"json",
"jsonpatch"
],
"type": "string"
},
"right": {
"anyOf": [
{
"$ref": "#/properties/state/properties/left/anyOf/0"
},
{
"$ref": "#/properties/state/properties/left/anyOf/1"
}
],
"description": "The right side of the diff (to compare with the left side)."
},
"rightFormat": {
"$ref": "#/properties/state/properties/leftFormat",
"description": "format of right side of the diff"
}
},
"required": [
"left",
"right"
],
"type": "object"
}
},
"required": [
"state"
],
"type": "object"
}