Make the file's rules explicit before another import
A column name is not a complete agreement. An order identifier may need to remain a string, a money value may be deliberately stored as decimal text, and an outlet/order pair may need to identify exactly one record. Sending a spreadsheet with five familiar headings leaves those choices implicit. This builder creates a small declared contract and then shows which parts a supplied JSON population satisfies.
Start with one reader task: give the next analyst an unambiguous description of the expected row and the checks that remain outside it. The interaction accepts JSON field declarations and JSON records; it does not import a spreadsheet, read a merchant account or discover the correct contract automatically. The generated schema is useful because its supported vocabulary is intentionally small and inspectable.
- Declare the shape and permitted JSON types of one row.
- Check each record, including the separate real-calendar rule.
- Check composite identity and the external expected row count.
- Investigate source authority, completeness and financial reconciliation outside this tool.
The official JSON Schema object reference distinguishes properties, required presence and additional-property rules. Those structural rules do not establish what a sale means, whether an export is complete or whether two systems refer to the same order. The application manifest therefore names the additional checks instead of presenting row-schema validity as a complete acceptance decision.
Work the fictional three-row case by hand
The sample describes five fields: outlet, order_id, amount, business_date and status. Every field is required. Outlet and order ID are nonnull strings. Amount is signed decimal text with at most two fractional digits. Business date has a fixed YYYY-MM-DD shape and a separate actual-Gregorian rule. Status is a nullable string with completed or cancelled as its nonnull choices.
| Record | Identity | Other values | Expected result |
|---|---|---|---|
| 1 | L / "001" | "12.50", "2026-11-28", "completed" | Locally row-valid |
| 2 | L / "001" | "7.50", "2026-11-28", "completed" | Locally row-valid; same identity as record 1 |
| 3 | L / numeric 2 | "oops", "2026-02-30", "completed" | Three field errors; invalid key component |
The third record has exactly three field failures: order_id has a JSON number where a string was declared; amount does not match the permitted plain-decimal text; and 30 February is not a real date. There is one duplicate identity group containing records 1 and 2. Those first two records still pass their local row rules. A schema for one row cannot, by itself, prove that its identity is unique across a file.
Load the corrected sample to use IDs "001", "002" and "003", replace the third amount with "9.00" and its date with "2026-02-28". All three records then pass the local row rules and no duplicate group remains. The values sum to 29.00, but the builder deliberately does not produce an accepted money total: it has not established reporting population, currency evidence, cancellation treatment or comparability. Do that reconciliation in a separate, documented check.
Fictional field contract · JSON · Original records · JSON · Corrected records · JSON · Independent answer key · JSON · Fixture instructions · TXT.
Understand the four types and the missing-value decisions
A string remains a string, including leading zeros and Unicode text. A required string may still be empty: required means the property is present, not that it contains meaningful text. The separate business-key check rejects missing, null, blank-only or type-invalid key components, even when a row declaration makes that field optional or nullable.
An integer must be an actual safe JSON integer between −9,007,199,254,740,991 and 9,007,199,254,740,991. A quoted "100" is not converted to 100. Decimal-text uses a fixed plain signed pattern with at most two fractional digits: "12", "12.5" and "-0.50" fit; grouped money, currency marks, exponent notation, blanks and "12.345" do not. This is a syntax contract, not an arithmetic conversion or proof that negative values are commercially correct.
Date-text has two layers. The exported row schema checks an anchored four-digit-year/two-digit-month/two-digit-day pattern. The local application also checks the actual Gregorian day and permits years 0001–9999. A correctly shaped "2026-02-30" therefore fails locally. The generated schema does not promise that another validator will enforce this calendar rule. The 2020-12 validation vocabulary treats format annotations and assertions separately; this builder does not hide that portability issue behind an unsupported universal format claim.
Required and nullable answer different questions. A missing required status fails. An explicit null status passes when nullable is true. An enum is supported only for string fields; it has 1–16 distinct string choices, with null added to the generated enum when nullable is true. No nested object types, arbitrary expressions, reader-supplied regular expressions or remote schema references are accepted.
Read the population witnesses before exporting
The composite key is an ordered tuple. ["L","001"] differs from ["L","1"] and from ["l","001"]. There is no trimming or case conversion of accepted values. The key checker does not invent a delimiter-based concatenation that could collide when an ID contains that delimiter. Records with invalid key components are reported separately rather than silently dropped into a shared blank-key group.
The expected row count is an optional external control. A match means only that the observed count equals the number you declared; it does not show that the right records were supplied. Entering 0 and supplying an empty array legitimately matches that count while proving nothing about whether a source ought to be empty. Leaving the field blank means no external count was declared, not zero.
The tool checks every supported record, even where the page shows only the first 100 witness rows. The current-scenario download retains the full returned result. Within that JSON, result.rowSchema is the generated row schema and result.businessCheckManifest is the separate application-check document. The export also includes current input text and error witnesses. There is no separate custom-schema download button and no hidden submission to a server.
The generated row schema is one-row documentation in the 2020-12 dialect. The local checker is this page's finite implementation of the declarations, not a general 2020-12 engine. Use an appropriately configured independent validator when integrating the schema elsewhere, and implement the manifest's calendar, identity and population rules explicitly.
Input uses the browser's ordinary JSON parser. Repeated property names inside a single object are not diagnosed; prepare objects with unique names. Numeric precision applies during parsing before the safe-integer field check, which examines the parsed number rather than its original numeric spelling. Keep exact identifiers and money as strings under a declared string or decimal-text rule. This is not a lossless numeric-token or duplicate-member JSON preflight.
This page extends the metric-contract change guide and vendor export acceptance cases with an editable contract and generated documents. It does not replace version approval, source access control or evidence of an actual export's completeness. Continue with the identifier round-trip test when your next step passes those identifiers through a spreadsheet.
