{
  "spec": "RFC 8785 (JSON Canonicalization Scheme)",
  "h33_version": "v0.2",
  "profile": "all (canonical bytes are profile-independent; SHA3 variant is profile-dispatched)",
  "conformance_rule": "An implementation is conformant if and only if, for every vector below, applying its canonical_json function to input.json produces bytes identical to canonical.txt, and applying SHA3-256 to those bytes produces sha3_256_hex.",
  "vectors": [
    {
      "id": "001-empty-object",
      "description": "Empty JSON object renders as two ASCII bytes.",
      "input_file": "001-empty-object/input.json",
      "canonical_file": "001-empty-object/canonical.txt",
      "canonical_bytes_length": 2,
      "sha3_256_hex": "840eb7aa2a9935de63366bacbe9d97e978a859e93dc792a0334de60ed52f8e99",
      "sha3_384_hex": "3763179c317870e535852680e55663659ac85034d5f99bbf31642fcfeaf2754a76350a19db6a8111a83609be2f1901ca"
    },
    {
      "id": "002-empty-array",
      "description": "Empty JSON array renders as two ASCII bytes.",
      "input_file": "002-empty-array/input.json",
      "canonical_file": "002-empty-array/canonical.txt",
      "canonical_bytes_length": 2,
      "sha3_256_hex": "ca4510738395af1429224dd785675309c344b2b549632e20275c69b15ed1d210",
      "sha3_384_hex": "125dcdc685273f640da30d7d66897f47690de230c20f8b944a24692a434e285622f501bceba8317665ddb7980cc49c5e"
    },
    {
      "id": "003-sorted-object-keys",
      "description": "Object keys are reordered to lexicographic UTF-16 code unit order; insertion order is not preserved.",
      "input_file": "003-sorted-object-keys/input.json",
      "canonical_file": "003-sorted-object-keys/canonical.txt",
      "canonical_bytes_length": 25,
      "sha3_256_hex": "a62dd68c6eb1d3fa034b2a3470bdb88bddbaaf75c60147b4996bce3a170761b0",
      "sha3_384_hex": "00eb4fb623134d804bcaf24a65aa11e108deda81086469051baed988933281e5312febb3489d9d45645fb4663ad12cb1"
    },
    {
      "id": "004-nested-objects",
      "description": "Nested objects recursively canonicalize. Arrays preserve their input order; objects sort.",
      "input_file": "004-nested-objects/input.json",
      "canonical_file": "004-nested-objects/canonical.txt",
      "canonical_bytes_length": 55,
      "sha3_256_hex": "92857a037c81e4169b12a8d185f28bb1fb91abd259020cc073da9986b0f46226",
      "sha3_384_hex": "f6ae77ece55574252702eaa883afb5b82136f416073cc052221cec9165419e43a110c46add5dd226d51f2917d1405be8"
    },
    {
      "id": "005-integer-and-float-edge-cases",
      "description": "Integers are emitted bare; the float value 1.0 emits as \"1\" per ECMAScript Number.prototype.toString(); -0 emits as \"0\".",
      "input_file": "005-integer-and-float-edge-cases/input.json",
      "canonical_file": "005-integer-and-float-edge-cases/canonical.txt",
      "canonical_bytes_length": 52,
      "sha3_256_hex": "21e00ebb12763457060dc7a874269736438e1d8376b25a93564bbda8be19fc59",
      "sha3_384_hex": "c8a28829d716e2af17f8ea98f05f3cc9cc7e833fd040c666d0b422f36cc8b6ad793f2a66c3f725a8237d79d168bfba27"
    },
    {
      "id": "006-unicode-control-escape",
      "description": "Control characters in the range U+0000-U+001F escape as six-byte \\u00XX sequences with lowercase hex.",
      "input_file": "006-unicode-control-escape/input.json",
      "canonical_file": "006-unicode-control-escape/canonical.txt",
      "canonical_bytes_length": 9,
      "sha3_256_hex": "ece945437f532d884d66695f50c91108662b8d1bc6fb17b1dbf1b5ab42da34d9",
      "sha3_384_hex": "fcca4faa0283abcc4b201b4ab125b8aa1b6f3f95d1da2405083196efc89c6d1f14fa8a18e72c3532b780eb17e6b48fbe"
    },
    {
      "id": "007-utf8-passthrough",
      "description": "Printable Unicode above U+001F passes through as UTF-8 bytes, not as escape sequences.",
      "input_file": "007-utf8-passthrough/input.json",
      "canonical_file": "007-utf8-passthrough/canonical.txt",
      "canonical_bytes_length": 20,
      "sha3_256_hex": "4a6e2b863ff57146b70ae5516a9ea4e2565aed910a2985139434d1e55714a006",
      "sha3_384_hex": "0acbed5fac3b50a71ff447f78eb350d1ab020de563eb37271b8d7ad85d5106ed23f98760980db147b8b6038b4a6b5177"
    }
  ],
  "notes": [
    "The canonical.txt files contain the raw canonical UTF-8 bytes; no trailing newline is added by JCS itself, but Git checkouts may add one \u2014 the JCS conformance check is over the exact byte sequence up to but not including any trailing newline a checkout adds.",
    "Implementations in languages other than Rust (Python, WASM, Go, Java) are conformant if and only if they produce the same canonical.txt bytes on the same input.json.",
    "SHA3-256 and SHA3-384 digests pinned 2026-06-07 against the reference Python sha3 implementation over the canonical.txt bytes (trailing newline added by checkout excluded). The same digests are reproducible with any FIPS 202 SHA3 implementation."
  ]
}
