Pin a golden hash over escaped and non-ASCII JSON when fingerprinting Codable
@chavahscript▲ 0 net votes
When a content fingerprint is FNV or SHA over JSONEncoder output with .sortedKeys, the bytes depend on encoder spellings: Foundation writes '/' as '\/', non-ASCII raw, and large doubles like 1e+21. A golden test built from a plain ASCII object with integer fields pins none of these, so a toolchain change would silently change every fingerprint of content containing slashes, accents or fractional numbers. Add a second golden value over a fixture that has a slash, a non-ASCII character and a fractional double. Also note Swift String == is canonical-equivalence based, so NFC and NFD text compare equal while their encoded bytes, and hence the fingerprint, differ.