{
  "$schema": "https://iarpg.com/canonical-json-profile.schema.json",
  "profile_id": "IARPG-CJSON-1",
  "profile_version": "1.0.0",
  "release": "IARPG-OPS-2",
  "release_version": "2.0.4-wip",
  "status": "current-project-profile",
  "canonical": "https://iarpg.com/canonical-json",
  "published_utc": "2026-07-20T12:04:07Z",
  "purpose": "Define stable project-local JSON bytes for content equality, deterministic fixtures, Operation Package component hashes, review ledgers, and browser-local handoffs.",
  "scope": "IARPG project artifacts only; this publication does not claim to be a general industry canonicalization standard.",
  "encoding": {
    "character_encoding": "UTF-8",
    "byte_order_mark": "prohibited",
    "malformed_utf8": "reject",
    "unicode_scalar_values": "required"
  },
  "parser_rules": [
    {
      "rule_id": "PARSE-01",
      "requirement": "Input MUST be one complete JSON value with no trailing non-whitespace content."
    },
    {
      "rule_id": "PARSE-02",
      "requirement": "Duplicate object keys MUST be rejected before normalization."
    },
    {
      "rule_id": "PARSE-03",
      "requirement": "Malformed UTF-8 and unpaired Unicode surrogates MUST be rejected."
    },
    {
      "rule_id": "PARSE-04",
      "requirement": "The untouched original representation MUST remain exportable when an import fails or is normalized."
    }
  ],
  "serialization_rules": [
    {
      "rule_id": "SER-01",
      "requirement": "Object keys MUST be sorted in ascending Unicode scalar-value order."
    },
    {
      "rule_id": "SER-02",
      "requirement": "Array order MUST be preserved exactly because array order is significant unless a separate standard says otherwise."
    },
    {
      "rule_id": "SER-03",
      "requirement": "No insignificant whitespace is emitted."
    },
    {
      "rule_id": "SER-04",
      "requirement": "Strings use JSON escaping for quotation mark, reverse solidus, and control characters; valid non-ASCII scalar values remain UTF-8."
    },
    {
      "rule_id": "SER-05",
      "requirement": "Unknown extension fields MUST be preserved and participate in canonicalization."
    },
    {
      "rule_id": "SER-06",
      "requirement": "Negative zero serializes as 0."
    }
  ],
  "number_rules": [
    {
      "rule_id": "NUM-01",
      "requirement": "Only finite JSON numbers are accepted."
    },
    {
      "rule_id": "NUM-02",
      "requirement": "Integer values MUST be inside the interoperable range −9007199254740991 through 9007199254740991."
    },
    {
      "rule_id": "NUM-03",
      "requirement": "Decimal values use the runtime shortest round-trippable JSON representation; publication fixtures avoid ambiguous cross-runtime exponent boundaries."
    }
  ],
  "timestamp_rules": [
    {
      "rule_id": "UTC-01",
      "requirement": "Fields whose name ends in _utc MUST use RFC 3339 UTC form YYYY-MM-DDTHH:mm:ss[.fraction]Z."
    },
    {
      "rule_id": "UTC-02",
      "requirement": "Offsets other than Z are rejected for _utc fields."
    }
  ],
  "hashing": {
    "algorithm": "SHA-256",
    "input": "UTF-8 bytes of canonical JSON",
    "output": "lowercase hexadecimal"
  },
  "integrity_boundary": "Matching canonical digests demonstrate equality under this profile. They do not prove identity, authorship, approval, authorization, or legal authenticity.",
  "vectors": "https://iarpg.com/canonicalization-vectors.json",
  "human_specification": "https://iarpg.com/docs/standards/IARPG-CJSON-1.md"
}
