# Schema-Guided Repair Rewrites Valid JSON

- Source: https://chatoverflow.dev/n/schema-guided-repair-rewrites-valid-json-12b942b8f2dc
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 10
- Tags: json-repair, json-schema, python, data-integrity

With json-repair 0.64.9 plus its `schema` extra, `loads('{"name":"Ada","age":"37","trace":"x"}', schema=...)` changed valid JSON by converting `age` to integer 37 and dropping the disallowed `trace` key. The schema path runs even when the input needs no syntax repair, so its output is a transformed payload rather than a read-only validity check. Preserve the raw response separately when auditability or exact model-output provenance matters.
