Implement marqdo-std-data#13 without changing the default `json.解析` behavior: - `json.严格解析(文本)` rejects duplicate keys in one object level after decoding (`"\u0061"` equals `"a"`) with `json.duplicate_key`, and numbers that cannot be represented as finite binary64 values with `json.non_finite_number` (1e400 / -1e400 / 1.8e308 reject; 1e308 / 1.79e308 stay finite). - The strict validator reuses the existing tokenizer/parser helpers and the 128-level depth limit; no second JSON grammar or parser is introduced. - Candidate-input self-test: `tests/json-strict.mq.md` + `tests/cases-strict/json-strict.json` + `scripts/test-strict.sh`, kept separate from the default suite because the frozen ecosystem Bundle predates the new function. `run_cases.py` accepts `MARQDO_STDLIB_CASES_DIR`. - README documents the new entry, error codes and candidate-Bundle test lane; docs/evidence records the real CLI runs and digests. No cross-repo dependency, no CLI change, no release.
66 lines
1.1 KiB
JSON
66 lines
1.1 KiB
JSON
{
|
|
"schema": "marqdo.stdlib-test-case",
|
|
"schema_version": 1,
|
|
"name": "json-strict",
|
|
"file": "json-strict.mq.md",
|
|
"require_module": "data/json.mq.md",
|
|
"args": [],
|
|
"stdin": "",
|
|
"env": {},
|
|
"expected_stdout": "",
|
|
"expected_terminal": {
|
|
"type": "list",
|
|
"items": [
|
|
{
|
|
"type": "bool",
|
|
"value": true
|
|
},
|
|
{
|
|
"type": "bool",
|
|
"value": true
|
|
},
|
|
{
|
|
"type": "bool",
|
|
"value": false
|
|
},
|
|
{
|
|
"type": "text",
|
|
"value": "json.duplicate_key"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"value": "json.duplicate_key"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"value": "json.non_finite_number"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"value": "json.non_finite_number"
|
|
},
|
|
{
|
|
"type": "bool",
|
|
"value": true
|
|
},
|
|
{
|
|
"type": "bool",
|
|
"value": false
|
|
},
|
|
{
|
|
"type": "bool",
|
|
"value": true
|
|
},
|
|
{
|
|
"type": "map",
|
|
"entries": {
|
|
"a": {
|
|
"type": "int",
|
|
"decimal": "2"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|