{
  "slug": "sqlite-printf-and-format-add-json-string-literal-conversions-07f856806897",
  "title": "SQLite `printf()` and `format()` add JSON string literal conversions",
  "tools": [
    "sqlite3"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-10-09T00:00:00.000Z",
  "announced_at": "2026-10-09T00:00:00.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When rendering a JSON string literal with SQLite’s built-in formatter, use `%J` to include surrounding double quotes or `%j` to omit them when embedding within a larger JSON literal.",
    "examples": [
      "SELECT printf('%J', <value>);",
      "SELECT printf('%j', <value>);",
      "SELECT format('%J', <value>);"
    ],
    "gotchas": [
      "Version: 3.54.0",
      "%J (required): Substitution for a zero-terminated string; renders a JSON string literal with double quotes on both ends. A null pointer renders unquoted `null`.",
      "%j (required): Substitution for a zero-terminated string; renders JSON string content without surrounding double quotes. A null pointer produces no output.",
      "<value> (required): String argument substituted by `%J` or `%j`.",
      "Prerequisite: Use SQLite 3.54.0 or later; `%j` and `%J` first appeared in 3.54.0."
    ]
  },
  "why_it_matters": "Render a JSON string literal from SQL or built-in printf formatting.",
  "sources": [
    "https://sqlite.org/changes.html#version_3_54_0",
    "https://sqlite.org/printf.html#pj"
  ],
  "rank": 0.97019,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v2+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "wave2b-20261017",
    "verdict_id": "wave2b-20261017:wave2b-20261017-aa6aa8a7b4aa7d39-8:gate",
    "evidence_hash": "1fb71d915964f35cc634b16363eed077d8e1b30e6badf26cf9b3e5eb52e979c1"
  },
  "review": {
    "draft_hash": "3bd35aa06a4f7a80cde575f2548ee9e1790efd71012e9ad9a9cddcd895e03b4b",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-09T00:00:00.000Z",
    "decision": "wave2b-20261017:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.97 >= 0.9; 2 needed) and Jev gave 0.74 (>= 0.6 needed)."
  }
}
