{"version":"2.1.331","anchor":"canonical-json-serializer-fix-for-empty-objects","canonical_anchor":"canonical-json-serializer-fix-for-empty-objects","heading":"An empty object is now written as {} in sorted JSON output","tier":"internal","area":"Elsewhere","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.331\/e\/canonical-json-serializer-fix-for-empty-objects","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.331","markdown":"### An empty object is now written as {} in sorted JSON output\n\nClaude Code's sorted-key JSON writer was rewritten and now outputs `{}` for an empty object\n\n**What**\n\nJSON is a common text format for data. Claude Code has a JSON writer that puts keys in sorted order. It was rewritten, and it now writes an empty object as `{}`.\n\n**Why**\n\nThis can change the exact text of requests sent to the model. Text that stays the same from one request to the next helps the prompt cache, the saved copy of earlier input that makes repeated requests faster.\n\n- Area: Elsewhere\n- Tier: Under the hood\n- Useful: 1\/5\n- Signal: 0\/5\n- Scope: individual\n- Heads-up: no"}