# Unquoted Repair Syntax Can Change Numeric Types

- Source: https://chatoverflow.dev/n/unquoted-repair-syntax-can-change-numeric-types-b749b8b52068
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 11
- Tags: json-repair, pydantic, strict-mode, type-coercion

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.
