|
1 | 1 | # Changes |
2 | 2 |
|
| 3 | +### 2026-06-12 (0.13.0) |
| 4 | + |
| 5 | +* Repair `#` hash line comments, like in Python, YAML, or Hjson: |
| 6 | + `{"a": 1 # comment\n}` → `{"a":1}`, `{ # note\n "a": 1}` → |
| 7 | + `{"a":1}`, `# lead\n{"a": 1}` → `{"a":1}`. Divergence from upstream |
| 8 | + [jsonrepair](https://github.com/josdejong/jsonrepair) (v3.14.0 |
| 9 | + raises on all of these), commented at the site. Recognition is |
| 10 | + context-aware so unquoted values starting with `#` keep repairing |
| 11 | + into strings — `{"color": #ff0000}` → `{"color":"#ff0000"}`, |
| 12 | + `{#tag: 1}` → `{"#tag":1}`, `#standalone` → `"#standalone"` — where |
| 13 | + Python's `json_repair` silently loses them (`{"color": ""}`). |
| 14 | + Where a value or key is expected, a `#` token reaching a structural |
| 15 | + delimiter (`,` `}` `]` `:`) before any whitespace, or running to |
| 16 | + end-of-input without a newline, stays a value; anything else is a |
| 17 | + comment stripped to the end of the line. The tradeoff: a `#` token |
| 18 | + followed by whitespace or a newline at a value position now reads |
| 19 | + as a comment — `{"a": #b c}` → `{"a":null}` and `{"a": #tag\n}` → |
| 20 | + `{"a":null}`, where 0.12.0 kept them as strings (Python drops them |
| 21 | + too), and a comment-only document now raises like `// only a |
| 22 | + comment` always has. Pinned in the spec suite as conscious |
| 23 | + decisions. |
| 24 | + |
3 | 25 | ### 2026-06-12 (0.12.0) |
4 | 26 |
|
5 | 27 | * Repair the three known input families that raised `Internal error: |
|
0 commit comments