Cross-language conformance testing for RFC 8785 (JSON Canonicalization Scheme) ECMA-262 number formatting.
RFC 8785 requires that JSON numbers are formatted according to ECMA-262 Number::toString. This suite tests whether JCS implementations across 6 languages produce the correct output for 286,362 boundary-targeted oracle vectors and 100,000,000 deterministic random vectors.
| Library | Language | 286K Boundary | 100M Random |
|---|---|---|---|
| canonicalize | JavaScript | PASS | PASS |
| json-canonicalize | JavaScript | PASS | PASS |
| cyberphone/json-canonicalization | Go | PASS | PASS |
| ucarion/jcs | Go | PASS | PASS |
| org.erdtman.jcs | Java | 2 FAIL | PASS |
| Org.Webpki.JsonCanonicalizer | C# | 2 FAIL | PASS |
| serde_jcs | Rust | PASS | PASS |
| serde_json_canonicalizer | Rust | PASS | PASS |
| jcs (PyPI) | Python | PASS | — |
The Java and C# reference implementations fail on subnormal value 0x00000000000007e8 (1e-320) due to a Grisu algorithm failure case. See IIW42-JCS-CONFORMANCE.md for full analysis.
./run-all.sh --all # Run all languages against 286K vectors
python3 report.py --summary # View results table
python3 report.py --divergences # View failure analysisThe 286,362 boundary vectors are generated by V8 (Node.js v23.3.0), cross-validated against SpiderMonkey and JavaScriptCore. They cover notation boundaries, subnormals, tie-breaking midpoints, and carry propagation edges.
MIT