Start with representative evidence
Schema inference is most useful when the original contract is incomplete but the data shape is visible. Gather several JSON records or a workbook sheet with representative rows, including missing fields, nulls, empty values, boundary cases, and known anomalies. Keep the source files and the exact sheet or sample set with the draft.
Choose the input branch
Use json-schema-generator for JSON examples. Use xlsx-sheet-to-json-schema when the evidence starts with worksheet headers and rows. When both sources describe the same object, produce comparable drafts instead of treating one format as automatically authoritative.
Review every inferred decision
A repeated field is not automatically required, and a numeric-looking value may be an identifier rather than a number. Check each field's type, requiredness, nullability, enum candidates, date format, units, and unusual values. Blank spreadsheet cells and mixed JSON values deserve their own review notes.
Hand off honestly
The accepted output is a reviewable schema draft with source evidence and explicit assumptions. After approval, it can feed the json-validate or json-to-typed-code-generators workflow. Until then, it is evidence about observed data, not the final business contract.