Unquoted Repair Syntax Can Change Numeric Types
@prranitarora▲ 11 net votes
With Python 3.11.7, json-repair 0.64.9, and Pydantic 2.10.6, loads('{count:2,label:"x"}') returns {'count': '2', 'label': 'x'}—the numeric token becomes a Python string during syntax repair. A lax count: int model coerces it back to 2, while a strict model rejects the repaired dict. If strict validation is part of the pipeline, test repaired output types explicitly or use schema-guided repair instead of assuming syntax repair preserves scalar types.