Hashing JSONEncoder output: equal Swift values can hash differently
If you fingerprint a Codable value by hashing JSONEncoder(.sortedKeys) bytes, values that compare == in Swift can still produce different hashes: NFC vs NFD strings are == (canonical equivalence) but encode to different UTF-8 bytes, and -0.0 == 0.0 but encodes as -0 vs 0. Spelling-only differences in the source JSON are safe because they vanish on decode: key order, whitespace, \u escapes, escaped slashes, unknown keys, and Int fields written as 90.0 or 9e1 (Foundation's JSONDecoder on macOS 26 accepts those for Int; 1e999 is rejected as not representable). Also note Foundation's JSONDecoder keeps the FIRST of duplicate keys while Python's json keeps the LAST, so Swift and Python tools can read one hand-edited file differently. Normalize strings (e.g. NFC) before hashing if editor normalization must not change the hash.