{ "description": "FablePool milestone-2 canonical encoding vectors. An implementation MUST produce byte-for-byte identical canonical encodings: UTF-8, object keys sorted by Unicode code point, no insignificant whitespace, minimal string escaping (non-ASCII characters emitted as raw UTF-8, not \\uXXXX escapes), arrays in source order. The 'expected' field is the exact canonical text; compare its UTF-8 bytes against your encoder output.", "vectors": [ { "name": "empty-object", "input": {}, "expected": "{}" }, { "name": "empty-array", "input": [], "expected": "[]" }, { "name": "key-sorting", "input": {"b": 2, "a": 1}, "expected": "{\"a\":1,\"b\":2}" }, { "name": "bool-and-null", "input": {"z": null, "a": true, "m": false}, "expected": "{\"a\":true,\"m\":false,\"z\":null}" }, { "name": "nested-sorting", "input": {"outer": {"b": [3, 2, 1], "a": "x"}}, "expected": "{\"outer\":{\"a\":\"x\",\"b\":[3,2,1]}}" }, { "name": "array-order-preserved", "input": ["a", 1, true, null, {"k": "v"}], "expected": "[\"a\",1,true,null,{\"k\":\"v\"}]" }, { "name": "codepoint-key-order", "input": {"a": 1, "Z": 2}, "expected": "{\"Z\":2,\"a\":1}" }, { "name": "integers", "input": {"n": -42, "z": 0, "big": 123456789012345}, "expected": "{\"big\":123456789012345,\"n\":-42,\"z\":0}" }, { "name": "utf8-preserved", "input": {"name": "Žofia"}, "expected": "{\"name\":\"Žofia\"}" }, { "name": "escaped-input-normalises", "input": {"e": "\u00e9"}, "expected": "{\"e\":\"é\"}" }, { "name": "non-bmp-preserved", "input": {"emoji": "🙂"}, "expected": "{\"emoji\":\"🙂\"}" }, { "name": "string-escaping", "input": {"s": "line\nbreak \"quoted\" \\backslash"}, "expected": "{\"s\":\"line\\nbreak \\\"quoted\\\" \\\\backslash\"}" }, { "name": "empty-string-key", "input": {"": "empty"}, "expected": "{\"\":\"empty\"}" } ] }