{
  "schema": "https://bars.commonsware.com/conformance/schema/render-fixture.schema.json",
  "version": "0.1.0",
  "cases": [
    {
      "name": "string-primitive-unquoted",
      "description": "{{ /name }} emits the string value without surrounding JSON quotes.",
      "template": "Hello {{ /name }}!",
      "context": {
        "name": "Alice"
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "Hello Alice!"
      }
    },
    {
      "name": "integer-primitive",
      "description": "Integer primitives render as their JSON form (no quotes).",
      "template": "Age: {{ /age }}",
      "context": {
        "age": 30
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "Age: 30"
      }
    },
    {
      "name": "decimal-primitive",
      "description": "Decimal numbers render with their JSON form.",
      "template": "Pi ~= {{ /pi }}",
      "context": {
        "pi": 3.14159
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "Pi ~= 3.14159"
      }
    },
    {
      "name": "boolean-true",
      "description": "true renders as the literal token \"true\".",
      "template": "Active: {{ /active }}",
      "context": {
        "active": true
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "Active: true"
      }
    },
    {
      "name": "boolean-false",
      "description": "false renders as the literal token \"false\".",
      "template": "Active: {{ /active }}",
      "context": {
        "active": false
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "Active: false"
      }
    },
    {
      "name": "json-null-renders-null",
      "description": "An explicit JSON null renders as the literal token \"null\".",
      "template": "Value: {{ /value }}",
      "context": {
        "value": null
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "Value: null"
      }
    },
    {
      "name": "missing-key-renders-null",
      "description": "A pointer that resolves to no element renders as the literal token \"null\".",
      "template": "Value: {{ /value }}",
      "context": {},
      "expect": {
        "kind": "output",
        "expectedOutput": "Value: null"
      }
    },
    {
      "name": "nested-pointer",
      "description": "JSON Pointer normal notation reaches into nested objects.",
      "template": "City: {{ /user/address/city }}",
      "context": {
        "user": {
          "address": {
            "city": "Springfield"
          }
        }
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "City: Springfield"
      }
    },
    {
      "name": "array-index",
      "description": "JSON Pointer can index arrays.",
      "template": "Second: {{ /names/1 }}",
      "context": {
        "names": [
          "Alice",
          "Bob",
          "Carol"
        ]
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "Second: Bob"
      }
    },
    {
      "name": "object-renders-as-json",
      "description": "A non-leaf JSON object renders as its compact JSON form (unescaped, as it is not a string primitive). Template-author bug, but defined behaviour.",
      "template": "Obj: {{ /user }}",
      "context": {
        "user": {
          "name": "Alice"
        }
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "Obj: {\"name\":\"Alice\"}"
      }
    },
    {
      "name": "array-renders-as-json",
      "description": "A non-leaf JSON array renders as its compact JSON form (unescaped, as it is not a string primitive).",
      "template": "Arr: {{ /names }}",
      "context": {
        "names": [
          "a",
          "b"
        ]
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "Arr: [\"a\",\"b\"]"
      }
    },
    {
      "name": "unescaped-string-primitive",
      "description": "{{{ /name }}} emits the string value without HTML escaping; unlike {{ /name }}, HTML-special characters are not escaped.",
      "template": "Hello {{{ /name }}}!",
      "context": {
        "name": "Alice"
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "Hello Alice!"
      }
    },
    {
      "name": "trim-variant-still-renders",
      "description": "Trim-delimiter variants with a plain value resolve the same way as non-trim variants when the value has no surrounding whitespace.",
      "template": "X{{~ /name ~}}Y",
      "context": {
        "name": "Alice"
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "XAliceY"
      }
    },
    {
      "name": "string-with-quote-content-only",
      "description": "Embedded characters in a string primitive emit verbatim (no JSON escaping).",
      "template": "{{ /s }}",
      "context": {
        "s": "a \"quoted\" word"
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "a &quot;quoted&quot; word"
      }
    },
    {
      "name": "single-slash-pointer-is-empty-key",
      "description": "`/` parses to a JsonPointer with one empty segment \u2014 i.e. the key whose name is the empty string.",
      "template": "X={{ / }}",
      "context": {
        "": "empty-key-value"
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "X=empty-key-value"
      }
    },
    {
      "name": "rfc6901-escape-slash",
      "description": "RFC 6901: `~1` inside a segment decodes to `/` \u2014 addresses the key `a/b`.",
      "template": "{{ /a~1b }}",
      "context": {
        "a/b": "found"
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "found"
      }
    },
    {
      "name": "rfc6901-escape-tilde",
      "description": "RFC 6901: `~0` inside a segment decodes to `~` \u2014 addresses the key `a~b`.",
      "template": "{{ /a~0b }}",
      "context": {
        "a~b": "found"
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "found"
      }
    },
    {
      "name": "rfc6901-escape-tilde-then-one-is-literal-tilde-one",
      "description": "RFC 6901 ordering: `~01` decodes as `~1` literally (tilde-substitution is applied last, not recursively).",
      "template": "{{ /a~01b }}",
      "context": {
        "a~1b": "found"
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "found"
      }
    },
    {
      "name": "rfc6901-escape-only-tilde-key",
      "description": "A segment of just `~0` decodes to the bare key `~`.",
      "template": "{{ /~0 }}",
      "context": {
        "~": "tilde-value"
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "tilde-value"
      }
    },
    {
      "name": "rfc6901-escape-only-slash-key",
      "description": "A segment of just `~1` decodes to the bare key `/`.",
      "template": "{{ /~1 }}",
      "context": {
        "/": "slash-value"
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "slash-value"
      }
    }
  ]
}
