{
  "version": 1,
  "cases": [
    {
      "id": "structured-values",
      "yaml": "# keep\nserver:\n  name: gateway\n  port: 8080\nenabled: true\nnodes: [alpha, beta]\nmissing: null\n",
      "expected": {
        "server": {
          "name": "gateway",
          "port": 8080
        },
        "enabled": true,
        "nodes": [
          "alpha",
          "beta"
        ],
        "missing": null
      },
      "preserve": "# keep"
    },
    {
      "id": "unicode-and-quoted-scalars",
      "yaml": "# configuration\nname: 'café 🚀'\ncode: '0123'\nmode: 'NO'\n",
      "expected": {
        "name": "café 🚀",
        "code": "0123",
        "mode": "NO"
      },
      "preserve": "# configuration"
    },
    {
      "id": "legacy-compatibility-profile",
      "yaml": "code: 0123\n",
      "expected": {
        "code": 123
      },
      "facade_expected": {
        "code": "0123"
      },
      "difference": "The documented serde_yaml compatibility profile preserves this legacy spelling as text."
    },
    {
      "id": "malformed-flow",
      "yaml": "broken: [1,\n",
      "reject": true
    },
    {
      "id": "literal-clip-at-eof",
      "yaml": "message: |\n  value",
      "expected": {
        "message": "value"
      }
    },
    {
      "id": "folded-clip-at-eof",
      "yaml": "message: >\n  first\n  second",
      "expected": {
        "message": "first second"
      }
    },
    {
      "id": "nested-anchor-redefinition",
      "yaml": "first: &x old\nsecond: &x [&x inner]\ncopy: *x\n",
      "expected": {
        "first": "old",
        "second": [
          "inner"
        ],
        "copy": "inner"
      }
    },
    {
      "id": "quoted-compatibility-strings",
      "yaml": "'0b11': '0xBBB9BBBBBBB73788'\n",
      "expected": {
        "0b11": "0xBBB9BBBBBBB73788"
      }
    },
    {
      "id": "unicode-root-with-cr-comment",
      "yaml": "ޙ\r# keep",
      "expected": "ޙ",
      "preserve": "# keep"
    },
    {
      "id": "alias-before-later-anchor",
      "yaml": "first: &x old\nsecond: &x new\ncopy: *x\nlast: &y leaf\n",
      "expected": {
        "first": "old",
        "second": "new",
        "copy": "new",
        "last": "leaf"
      }
    },
    {
      "id": "under-indented-quoted-continuation",
      "yaml": "name: test\nve teplain: hello world\nsingle: 'canst\nver'",
      "reject": true
    },
    {
      "id": "unindented-mapping-value",
      "yaml": "plain: \ninfinite\nbool_false: false\nempty: ''\n",
      "reject": true
    },
    {
      "id": "plain-continuation-tab-indentation",
      "yaml": "- a\n\tb\n",
      "reject": true
    },
    {
      "id": "bom-tab-only-document",
      "yaml": "﻿\t",
      "expected": null,
      "mcp_expected_documents": [],
      "difference": "MCP parses a document stream: trivia alone has zero documents. Single-value entry points project the empty input to null."
    },
    {
      "id": "directive-name-raw-control",
      "yaml": "%TA\u0001G ! tag:example:\n---\na: 1\n",
      "reject": true
    },
    {
      "id": "directive-version-raw-control",
      "yaml": "%YAML 1.\u00010\n---\na: 1\n",
      "reject": true
    },
    {
      "id": "directive-handle-raw-control",
      "yaml": "%TAG !\u0001! tag:example:\n---\na: 1\n",
      "reject": true
    },
    {
      "id": "directive-prefix-raw-control",
      "yaml": "%TAG ! tag:exam\u0001ple:\n---\na: 1\n",
      "reject": true
    },
    {
      "id": "resolved-tag-closing-delimiter",
      "yaml": "%TAG !e! tag:example:bad>\n---\n!e!item x\n",
      "reject": true
    },
    {
      "id": "standard-tag-directive",
      "yaml": "%TAG !! tag:yaml.org,2002:\n---\na: !!str 12\nb: !!int 12\nc: !!bool true\n",
      "expected": {
        "a": "12",
        "b": 12,
        "c": true
      }
    },
    {
      "id": "unicode-crlf-diagnostics",
      "yaml": "name: café 🚀\r\nbroken: [1,\r\n",
      "reject": true
    },
    {
      "id": "empty-line-tabs-between-nodes",
      "yaml": "a: 1\n\t\r\nb: 2\n",
      "expected": {
        "a": 1,
        "b": 2
      }
    },
    {
      "id": "explicit-null-document",
      "yaml": "---\nnull\n",
      "expected": null
    },
    {
      "id": "canonical-null-duplicate-last",
      "yaml": "~: 1\nnull: 2\nsibling: [3, 4]\n",
      "expected": {
        "null": 2,
        "sibling": [
          3,
          4
        ]
      },
      "mcp_profile": "standard",
      "difference": "MCP standard uses Last; its strict default has separately verified scalar and duplicate rules.",
      "mcp_default_expected": {
        "error_contains": "duplicate"
      }
    },
    {
      "id": "canonical-bool-duplicate-last",
      "yaml": "True: 1\ntrue: 2\n",
      "expected": {
        "true": 2
      },
      "mcp_profile": "standard",
      "difference": "MCP standard uses Last; its strict default has separately verified scalar and duplicate rules.",
      "mcp_default_expected": {
        "documents": [
          {
            "True": 1,
            "true": 2
          }
        ]
      }
    },
    {
      "id": "canonical-integer-duplicate-last",
      "yaml": "0x1F: 1\n31: 2\n",
      "expected": {
        "31": 2
      },
      "mcp_profile": "standard",
      "difference": "MCP standard uses Last; its strict default has separately verified scalar and duplicate rules.",
      "mcp_default_expected": {
        "error_contains": "duplicate"
      }
    },
    {
      "id": "canonical-alias-duplicate-last",
      "yaml": "anchor: &n ~\nmap: {*n : 1, null: 2}\n",
      "expected": {
        "anchor": null,
        "map": {
          "null": 2
        }
      },
      "mcp_profile": "standard",
      "difference": "MCP standard uses Last; its strict default has separately verified scalar and duplicate rules.",
      "mcp_default_expected": {
        "error_contains": "duplicate"
      }
    },
    {
      "id": "canonical-key-type-collision",
      "yaml": "null: 1\n'null': 2\n",
      "reject": true
    }
  ]
}
