kingy tested
Tested repair · Qwen3 + JSON parser · llama.cpp build10809; exact GGUF revisions in evidence ZIP; retained-output replay in Python 3.14.0
Check this fix
- Applies when
- Python json.loads rejects a response beginning with ```json with JSONDecodeError: Expecting value: line 1 column 1 (char 0).
- Change to inspect
- Remove one enclosing Markdown fence only when it wraps the entire response, then parse and validate the answer again. Keep both the raw response and its original failed score.
- Expected result
- The September 21 replay found 13 whole-response fenced outputs among 36 retained attempts. Six matched their answer keys after unfencing; seven still contained wrong answers. Seven negative controls were rejected. No model was rerun and historical strict scores remain unchanged.
- If it still fails
- Keep the original failed output and check the conditions and verification steps below. Retained failed attempt: Three formatting-only failures for 0.6B and three for 1.7B remained failed in the original benchmark.
Tested or reviewed 2026-09-21. Verify the original task on your own version and settings; this case does not prove a universal fix.
Read the verification steps ↓ · Report your outcome ↓Try the correction
Make this JSON parse.
Start with an original failed response, or paste a non-sensitive example. This runs in your browser; your text is not sent to Kingy.
Rejects duplicate keys and non-finite numbers. It removes one whole-response fence; it cannot correct invented or wrong values.
What happened
Symptom
Python json.loads rejects a response beginning with ```json with JSONDecodeError: Expecting value: line 1 column 1 (char 0).
Exact environment and tested conditions
Qwen3-0.6B-Q8_0 and Qwen3-1.7B-Q8_0 in the retained four-task JSON pilot
Correction
Remove one enclosing Markdown fence only when it wraps the entire response, then parse and validate the answer again. Keep both the raw response and its original failed score.
Result
The September 21 replay found 13 whole-response fenced outputs among 36 retained attempts. Six matched their answer keys after unfencing; seven still contained wrong answers. Seven negative controls were rejected. No model was rerun and historical strict scores remain unchanged.
What did not work
Three formatting-only failures for 0.6B and three for 1.7B remained failed in the original benchmark.
- Save the raw response. Confirm the entire trimmed response is a single ```json or ``` fenced block; the replay script rejects surrounding prose and embedded backticks.
- Remove only that opening line and final closing fence. Never extract a convenient object from a longer response.
- Parse with duplicate-key rejection via object_pairs_hook and nonstandard-number rejection via parse_constant and finite-float range checking via parse_float; json.loads defaults alone do not provide these checks.
- Compare the parsed result with the source answer, including keys, types, values and array order. In the retained test, boolean true cannot stand in for number 1.
- Fallback: if the response has prose, multiple blocks or wrong values, keep it failed. Obtain a new response or correct the task input, then validate independently; do not infer missing facts.
- Download the reproduction ZIP under Sources & limits to replay the 36 retained attempts and seven negative controls without calling a model.
Sources & limits
Small Qwen3 models: retained JSON pilot
Python JSON decoder: hooks, errors and compliance
September 21 Fix Finder reproduction scripts and results (ZIP)
Record checked 2026-09-21.
This is post-processing verified against retained output, not a retested prompting correction.
Do not strip arbitrary text, silently accept wrong values, or use an unknown answer key as proof.
The replay has known answer keys. In a real workflow, a valid JSON document still needs schema and source-fact checks; parsing success is insufficient.
The diagnostic accepts a narrow fence shape and caps response length at 100,000 characters. It is a reproducibility example, not a complete untrusted-input service.