Rouiada, Guigui, all

the measurement is below. The divergence between the two readers sits in -0 as an integer, while non-ASCII and floats agree, which revises what I wrote here last week.

Measured against agent-evidence-vectors v0.17.4 at 99b47c56, Python reader under CPython 3.9.6 and 3.12.12, Go reader under Go 1.27.2, each input as the document {"v": X}.

Non-ASCII agrees byte for byte. U+00E9, U+20AC, U+1F600 and U+2028 produce the same escaped bytes in both readers.

Floats are refused by both: 1.0, 0.1, 1e16, 1e21, 1e-7 and -0.0, and inside a check both refuse with W3C-R-020.

-0 is an integer and neither reader refuses it. Python parses it as the integer 0 and emits {"v":0} (7b2276223a307d). Go keeps the literal and emits {"v":-0} (7b2276223a2d307d). Two digests over the same report therefore differ, and whichever reader wrote the stored digest decides which side accepts it. The side that rejects reports W3C-R-020 without naming the cause.

Nothing in the corpus is affected today: a text search over the 240 files in vectors-w3c-report finds no -0.

A second difference appears in the findings text. For a refused float in a field that feeds the member identifier, both readers attach the error text, and the exponent forms differ: Python names 1e+16, 1e+21 and 1e-07 where Go names 1e16, 1e21 and 1e-7.

The v0.1 text never says which bytes enter a digest over a JSON value. The readers decide it in code, as compact JSON with sorted keys and ASCII escaping, and neither comment cites spec text. Under RFC 8785 the answer is determined, since ECMAScript Number::toString(-0) is "0", which makes the Python result the canonical one. The text does not say that the digest encoding is RFC 8785, so under v0.1 as written the Go result is equally defensible.

I would propose for v0.1: A digest taken over a JSON value is computed over the RFC 8785 canonical form of that value. The encoding identifier is jcs-sha256, drawn from the closed, versioned set that W3C-R-015 requires a report to declare. A reader that does not implement a report's declared digest encoding rejects the report and says so.

If the group would keep the current encoding instead, the paragraph has to state the number rule explicitly, because the two readers already disagree on -0 and "compact JSON with sorted keys" does not decide it.

Guigui, a third reading of -0 from your canonicaliser would settle whether the split is two-way or three-way.

Lars
