Dataset Viewer
Auto-converted to Parquet Duplicate
applied_policy
stringlengths
30
100
broken_input
stringlengths
20
173
case_id
stringlengths
4
4
expected_repaired
stringlengths
21
175
⌀
rationale
stringlengths
43
99
repair_category
stringclasses
10 values
scoring_notes
stringclasses
2 values
unrecoverable
bool
2 classes
incomplete tail dropped at the last complete value; open containers closed in reverse order
{"order_id":"A-1001"
J001
{"order_id":"A-1001"}
the stream ends inside an open container with the last complete value intact
truncation
Parse the repair layer output and expected_repaired, then compare as values (deep equality). Byte or string comparison is not the scoring rule: whitespace and object key order carry no meaning in JSON.
false
incomplete tail dropped at the last complete value; open containers closed in reverse order
{"job_id":"J-88","attempts":1
J014
{"job_id":"J-88","attempts":1}
the stream ends inside an open container with the last complete value intact
truncation
Parse the repair layer output and expected_repaired, then compare as values (deep equality). Byte or string comparison is not the scoring rule: whitespace and object key order carry no meaning in JSON.
false
repair withheld: the cut falls inside a number token
{"invoice_no":"INV-77","total_cents":129
J028
null
the amount may be 129, 1295 or 12950 and the bytes do not say which
truncation
The repair layer passes this row only by declining to repair or by flagging the input as ambiguous. Any confident repair scores as a failure, including a repair a human would find plausible.
true
comma standing immediately before a closing bracket or brace removed
{"sensor_id":"HUM-02","samples":[41,43,44,],"median":43,"unit":"percent"}
J031
{"sensor_id":"HUM-02","samples":[41,43,44],"median":43,"unit":"percent"}
a separator survives the value it was meant to separate
trailing_comma
Parse the repair layer output and expected_repaired, then compare as values (deep equality). Byte or string comparison is not the scoring rule: whitespace and object key order carry no meaning in JSON.
false
comma standing immediately before a closing bracket or brace removed
{"batch":"B-2026-04","units":900,"defect_ppm":120,}
J044
{"batch":"B-2026-04","units":900,"defect_ppm":120}
a separator survives the value it was meant to separate
trailing_comma
Parse the repair layer output and expected_repaired, then compare as values (deep equality). Byte or string comparison is not the scoring rule: whitespace and object key order carry no meaning in JSON.
false
repair withheld: two commas with nothing between them
{"sku":"BRK-9",,"on_hand":47}
J058
null
a whole member may have been dropped between the commas, or the second comma is stray
trailing_comma
The repair layer passes this row only by declining to repair or by flagging the input as ambiguous. Any confident repair scores as a failure, including a repair a human would find plausible.
true
single-quoted keys and string values re-delimited with double quotes
{'sku':'BRK-9','on_hand':47,'location':'AISLE-3'}
J061
{"sku":"BRK-9","on_hand":47,"location":"AISLE-3"}
apostrophes stand in for the double quotes JSON requires; character content is unaffected
single_quotes
Parse the repair layer output and expected_repaired, then compare as values (deep equality). Byte or string comparison is not the scoring rule: whitespace and object key order carry no meaning in JSON.
false
single-quoted keys re-delimited with double quotes
{'window':"08:00-16:00",'shift':"day",'crew':6}
J074
{"window":"08:00-16:00","shift":"day","crew":6}
apostrophes stand in for the double quotes JSON requires; character content is unaffected
single_quotes
Parse the repair layer output and expected_repaired, then compare as values (deep equality). Byte or string comparison is not the scoring rule: whitespace and object key order carry no meaning in JSON.
false
repair withheld: an apostrophe inside the run makes the string boundary indeterminate
{'note':'it's fine'}
J088
null
the value reads as it is fine, or the string ends after two characters and the rest is unparsed
single_quotes
The repair layer passes this row only by declining to repair or by flagging the input as ambiguous. Any confident repair scores as a failure, including a repair a human would find plausible.
true
raw U+000A inside a string replaced by its shortest JSON escape, code point preserved
{"flag":"new_ch eckout","enabled":false,"rollout_pct":25}
J091
{"flag":"new_ch\neckout","enabled":false,"rollout_pct":25}
the string carries a control byte that JSON admits only in escaped form
unescaped_control
Parse the repair layer output and expected_repaired, then compare as values (deep equality). Byte or string comparison is not the scoring rule: whitespace and object key order carry no meaning in JSON.
false
raw U+0008 inside a string replaced by its shortest JSON escape, code point preserved
{"report":"weekly","rows":120,"notes":"partial extract"}
J104
{"report":"wee\bkly","rows":120,"notes":"partial extract"}
the string carries a control byte that JSON admits only in escaped form
unescaped_control
Parse the repair layer output and expected_repaired, then compare as values (deep equality). Byte or string comparison is not the scoring rule: whitespace and object key order carry no meaning in JSON.
false
raw U+0007 inside a string replaced by its shortest JSON escape, code point preserved
{"cache":{"ttl_s":600,"size":128},"mode":"warm","version":2}
J117
{"cache":{"ttl_s":600,"size":128},"mode":"wa\u0007rm","version":2}
the string carries a control byte that JSON admits only in escaped form
unescaped_control
Parse the repair layer output and expected_repaired, then compare as values (deep equality). Byte or string comparison is not the scoring rule: whitespace and object key order carry no meaning in JSON.
false
NaN in a value position mapped to null; the original token is not recoverable from the bytes
{"route":"R-12","stops":["Kiel","Lubeck","Rostock"],"km":NaN}
J121
{"route":"R-12","stops":["Kiel","Lubeck","Rostock"],"km":null}
a non-finite literal occupies a slot where JSON admits only a finite number
nan_infinity
Parse the repair layer output and expected_repaired, then compare as values (deep equality). Byte or string comparison is not the scoring rule: whitespace and object key order carry no meaning in JSON.
false
Infinity in a value position mapped to null; the original token is not recoverable from the bytes
{"lane":"L-4","throughput_per_h":Infinity,"blocked":false}
J134
{"lane":"L-4","throughput_per_h":null,"blocked":false}
a non-finite literal occupies a slot where JSON admits only a finite number
nan_infinity
Parse the repair layer output and expected_repaired, then compare as values (deep equality). Byte or string comparison is not the scoring rule: whitespace and object key order carry no meaning in JSON.
false
-Infinity in a value position mapped to null; the original token is not recoverable from the bytes
{"tracking":"ZX9931","legs":-Infinity,"delivered":false}
J147
{"tracking":"ZX9931","legs":null,"delivered":false}
a non-finite literal occupies a slot where JSON admits only a finite number
nan_infinity
Parse the repair layer output and expected_repaired, then compare as values (deep equality). Byte or string comparison is not the scoring rule: whitespace and object key order carry no meaning in JSON.
false
block comment removed; remaining document re-emitted in compact form
{/* legacy field, keep for now */"device":"gw-01","firmware":"2.4.1","uptime_h":120,"online":true}
J151
{"device":"gw-01","firmware":"2.4.1","uptime_h":120,"online":true}
the document carries an annotation the JSON grammar has no slot for
comments
Parse the repair layer output and expected_repaired, then compare as values (deep equality). Byte or string comparison is not the scoring rule: whitespace and object key order carry no meaning in JSON.
false
trailing line comment removed; remaining document re-emitted in compact form
{"chart":"burn_down","points":[3,2,2,1],"sprint":14,"done":false} // do not reorder these keys
J164
{"chart":"burn_down","points":[3,2,2,1],"sprint":14,"done":false}
the document carries an annotation the JSON grammar has no slot for
comments
Parse the repair layer output and expected_repaired, then compare as values (deep equality). Byte or string comparison is not the scoring rule: whitespace and object key order carry no meaning in JSON.
false
line comment removed; remaining document re-emitted in compact form
{ // exported by hand "invoice_no": "INV-77", "total_cents": 12950, "currency": "EUR" }
J177
{"invoice_no":"INV-77","total_cents":12950,"currency":"EUR"}
the document carries an annotation the JSON grammar has no slot for
comments
Parse the repair layer output and expected_repaired, then compare as values (deep equality). Byte or string comparison is not the scoring rule: whitespace and object key order carry no meaning in JSON.
false
two adjoining documents collected into an array in stream order; no merge, no de-duplication
{"sku":"CLP-4","price_cents":499,"tier":"standard"}{"window":"08:00-16:00","shift":"day","crew":6}
J181
[{"sku":"CLP-4","price_cents":499,"tier":"standard"},{"window":"08:00-16:00","shift":"day","crew":6}]
two complete documents share one byte stream with no separator between them
concatenated_objects
Parse the repair layer output and expected_repaired, then compare as values (deep equality). Byte or string comparison is not the scoring rule: whitespace and object key order carry no meaning in JSON.
false
two newline-separated documents collected into an array in stream order; no merge, no de-duplication
{"order_id":"A-1002","qty":12,"ship_to":"Bremen","express":true} {"sensor_id":"TMP-07","reading_c":21.5,"unit":"celsius","ok":true}
J194
[{"order_id":"A-1002","qty":12,"ship_to":"Bremen","express":true},{"sensor_id":"TMP-07","reading_c":21.5,"unit":"celsius","ok":true}]
a newline-delimited record stream was handed over as one document
concatenated_objects
Parse the repair layer output and expected_repaired, then compare as values (deep equality). Byte or string comparison is not the scoring rule: whitespace and object key order carry no meaning in JSON.
false
three space-separated documents collected into an array in stream order; no merge, no de-duplication
{"doc_id":"D-3","title":"Loading dock notes","pages":4} {"device":"gw-01","firmware":"2.4.1","uptime_h":120,"online":true} {"batch":"B-2026-04","units":900,"defect_ppm":120}
J207
[{"doc_id":"D-3","title":"Loading dock notes","pages":4},{"device":"gw-01","firmware":"2.4.1","uptime_h":120,"online":true},{"batch":"B-2026-04","units":900,"defect_ppm":120}]
three complete documents share one byte stream
concatenated_objects
Parse the repair layer output and expected_repaired, then compare as values (deep equality). Byte or string comparison is not the scoring rule: whitespace and object key order carry no meaning in JSON.
false
every bare key quoted verbatim
{group:"pumps",items:[{id:1,ok:true},{id:2,ok:false}],count:2}
J211
{"group":"pumps","items":[{"id":1,"ok":true},{"id":2,"ok":false}],"count":2}
keys are written as bare identifiers, which JSON admits only as quoted strings
unquoted_keys
Parse the repair layer output and expected_repaired, then compare as values (deep equality). Byte or string comparison is not the scoring rule: whitespace and object key order carry no meaning in JSON.
false
the single bare key quoted verbatim
{retries:3,"timeout_ms":2500,"backoff":"exponential"}
J224
{"retries":3,"timeout_ms":2500,"backoff":"exponential"}
keys are written as bare identifiers, which JSON admits only as quoted strings
unquoted_keys
Parse the repair layer output and expected_repaired, then compare as values (deep equality). Byte or string comparison is not the scoring rule: whitespace and object key order carry no meaning in JSON.
false
every bare key at the top level quoted verbatim
{site:"WH-2",lat:53.5511,lon:9.9937}
J237
{"site":"WH-2","lat":53.5511,"lon":9.9937}
keys are written as bare identifiers, which JSON admits only as quoted strings
unquoted_keys
Parse the repair layer output and expected_repaired, then compare as values (deep equality). Byte or string comparison is not the scoring rule: whitespace and object key order carry no meaning in JSON.
false
the one inconsistent closing delimiter replaced by the match of its opener; single-character repair
{"pallet":"P-31","weight_kg":412.5,"stacked":true]
J241
{"pallet":"P-31","weight_kg":412.5,"stacked":true}
one closing delimiter contradicts the opener it belongs to, and one character resolves the document
mismatched_brackets
Parse the repair layer output and expected_repaired, then compare as values (deep equality). Byte or string comparison is not the scoring rule: whitespace and object key order carry no meaning in JSON.
false
the one inconsistent closing delimiter replaced by the match of its opener; single-character repair
{"ticket_id":"T-500","priority":2,"tags":["billing","urgent"]]
J254
{"ticket_id":"T-500","priority":2,"tags":["billing","urgent"]}
one closing delimiter contradicts the opener it belongs to, and one character resolves the document
mismatched_brackets
Parse the repair layer output and expected_repaired, then compare as values (deep equality). Byte or string comparison is not the scoring rule: whitespace and object key order carry no meaning in JSON.
false
the one inconsistent closing delimiter replaced by the match of its opener; single-character repair
{"alert_id":"AL-19","severity":"warn","count":3]
J267
{"alert_id":"AL-19","severity":"warn","count":3}
one closing delimiter contradicts the opener it belongs to, and one character resolves the document
mismatched_brackets
Parse the repair layer output and expected_repaired, then compare as values (deep equality). Byte or string comparison is not the scoring rule: whitespace and object key order carry no meaning in JSON.
false
quotes re-delimited, then the stray comma before the closing delimiter removed
{'event':'door_open','zone':'cold-1','seconds':14,}
J271
{"event":"door_open","zone":"cold-1","seconds":14}
single-quoted delimiters and a surviving separator in one document
mixed_multi_fault
Parse the repair layer output and expected_repaired, then compare as values (deep equality). Byte or string comparison is not the scoring rule: whitespace and object key order carry no meaning in JSON.
false
trailing line comment removed, then every bare key quoted verbatim
{metric:"latency_p95",value:184.2,window_s:60} // do not reorder these keys
J284
{"metric":"latency_p95","value":184.2,"window_s":60}
bare keys and an annotation in one document
mixed_multi_fault
Parse the repair layer output and expected_repaired, then compare as values (deep equality). Byte or string comparison is not the scoring rule: whitespace and object key order carry no meaning in JSON.
false
NaN mapped to null, then the stray comma before the closing delimiter removed
{"sample_id":"S-401","ph":NaN,"turbidity_ntu":0.8,}
J297
{"sample_id":"S-401","ph":null,"turbidity_ntu":0.8}
a non-finite literal and a surviving separator in one document
mixed_multi_fault
Parse the repair layer output and expected_repaired, then compare as values (deep equality). Byte or string comparison is not the scoring rule: whitespace and object key order carry no meaning in JSON.
false

JSON repair eval (sample)

30 cases of broken JSON. Each one has the text exactly as a parser would receive it, the repair we expect, the breakage category, the rule applied and the reason. It's a sample of a 300-case set for testing the repair step that sits behind an LLM's structured output or a stream that got cut off.

There are ten categories: truncation, trailing commas, single quotes, unescaped control characters, NaN and Infinity, comments, concatenated objects, unquoted keys, mismatched brackets, and mixed faults. This sample has three cases from each.

Three of the 30 have no correct repair (unrecoverable: true). Take {"invoice_no":"INV-77","total_cents":129: the total could be 129, 1295 or 12950, and the bytes don't say. A repair layer should decline those. Any confident fix counts as a failure.

Scoring

Parse your output and expected_repaired, then compare the values. Don't compare strings, because whitespace and key order mean nothing in JSON. On an unrecoverable case, declining is the only pass.

Fields

field meaning
case_id stable id
broken_input the malformed text
expected_repaired the expected JSON text, or null when there is no correct repair
repair_category one of the ten categories, defined in repair_categories.json
applied_policy the rule that produced the repair
rationale why that repair, or why none
scoring_notes how to score the row
unrecoverable true when no repair is correct

The full set

All 300 cases (270 with a repair, 30 without) are on Graunt, sold by Lapidary: JSON Repair Eval Set.

Origin

Every case was written for this set from synthetic seeds by a deterministic build program. No language model generated any case, and no value refers to a real person or company. This sample is licensed CC BY 4.0.

Downloads last month
19