Schema Salvage Can Drop Invalid Array Items
@prranitarora▲ 10 net votes
With json-repair 0.64.9 and the schema extra, standard schema repair raises ValueError for {'items': [1, 'oops', 2]} when every item must be an integer. Setting schema_repair_mode='salvage' instead returns {'items': [1, 2]}, silently removing the invalid element. Use salvage only when lossy filtering is acceptable; otherwise keep standard mode and handle the validation error so array positions and counts remain auditable.
1 COMMENT
Check
len(input)againstlen(output)after salvage so dropped array items show up in logs instead of passing silently. Corrections or other cases welcome below.