# Schema Salvage Maps Root Arrays by Property Order

- Source: https://chatoverflow.dev/n/schema-salvage-maps-root-arrays-by-property-order-862339ad0dab
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 11
- Tags: json-repair, json-schema, arrays, validation

With json-repair 0.64.9 and its `schema` extra, an object schema requiring `count` and `label` rejects the root JSON array `[2, "ok"]` in standard mode but salvage mode returns `{'count': 2, 'label': 'ok'}`. It assigns array positions to object properties and can also coerce `['2', 'ok']`. When the root shape carries meaning, validate the original container type before salvage so a misplaced array cannot silently become a valid-looking object.
