Neatbo.

Array item rules belong inside items

Understand why a renamed field can pass an array schema, then move object rules into items and keep complete diagnostics.

Array item rules belong inside items

Putting properties and required next to type: array does not constrain each array item. The supplied question demonstrates an instance that still passes after a field is renamed. Nest the object rules under items, then test the missing-field case. Duplicate keys and trailing commas in the posted samples must be corrected transparently before a separate replay.

Try the complete workflow

Move object rules under array items when intended; correct syntax or unsupported constraints, then rerun. A valid result means this instance satisfies the supported supplied schema.

  • Confirm whether the requirement concerns the array itself or each object inside it.
  • Place per-object rules under items and test an element missing the required field.
  • Keep the source post separate from any transparently corrected replay.
  • Review the complete diagnostics; a placement note does not rewrite the supplied schema.

Compare intended rules, not just JSON syntax

Formatting and sample type inference answer different questions. A supplied schema check evaluates the rules you actually provide; it cannot infer the API owner’s intended requirements. properties and required alongside type: array are placement notes, not automatically rewritten constraints.

Where a rule applies matters
PlacementEffect for an array instance
type: arrayChecks the container type
properties / required beside type: arrayDoes not apply object rules to each array element
Object properties / required under itemsApplies the supplied object rules to each element
Object rules for each array item
{"type":"array","items":{"type":"object","properties":{"a":{"type":"string"}},"required":["a"]}}

An evaluation path is not a resolved source pointer

The complete report preserves the instance location, keyword, evaluation path and technical message for every retained diagnostic. Local references can add transitions to the evaluation path. Keep repeated parent and leaf entries; collapsing them to one row loses report evidence.

References

  • Supplied schema and renamed-field question

    The complete demonstration is a separately normalized replay: decoded duplicates were resolved last-wins and trailing commas were removed. The unchanged post is refused; its array rules were moved under items as the author intended.

  • JSON Schema Draft 2020-12

    Background specification; the supported static profile is narrower and does not claim full conformance.

Tools in this category

Expand a tool to see its steps, options and supported formats, then open its workspace.

Validate a JSON instance against a schemaCheck supplied Draft 2020-12 constraints, inspect every supported rule failure and save the complete validation report.

Check supplied Draft 2020-12 constraints, inspect every supported rule failure and save the complete validation report.

Steps

  1. Provide the instance and the authoritative schema in their separate roles.
  2. Choose the active source mode for each role. File selection shows metadata only; click Run to read and process.
  3. Validate; distinguish a refused schema/profile from a successfully evaluated invalid instance.
  4. Read instance pointers and evaluation paths. Save validation-report.json or copy the complete report.

Capabilities and limits

  • Instance up to 1 MiB, 50,000 value nodes and depth 64; schema up to 128 KiB, 5,000 nodes, depth 32 and 1,000 schema locations. Node depth starts at zero.
  • Fixed Draft 2020-12 static subset: types, const/enum, required and dependencies, properties and arrays, numeric/string rules, applicators and acyclic same-document JSON Pointer references. Unknown or unsupported keywords stop the run.
  • All JSON numeric tokens must be mathematically integral and within ±9,007,199,254,740,991. Decimal notation such as 1.00 is allowed when its exact value is integral; fractional and rounded unsafe values are refused.
  • Flat ECMA262-u patterns up to 128 UTF-8 bytes allow literals, character classes, anchors, dot and simple quantifiers. Grouping, alternation, backreferences and alphabetic shorthand escapes except f/n/r/t/v are refused. No remote refs, anchors, dynamic refs, unevaluated rules, format or custom validation code.
  • Unsupported schema vocabulary/content keywords, $anchor/$dynamicAnchor/$dynamicRef, unevaluated rules, format, nested $id, remote or percent/anchor references and recursive local references refuse the run. This static profile is not full Draft 2020-12 conformance.
  • Validation and deep-comparison calls together allow 2,000,000; all attempted distinct diagnostics allow 20,000 and 8 MiB of compact diagnostic work. The complete exported report allows 8 MiB. Any exceeded limit refuses the complete result.
  • Cumulative schema-location JSON Pointer paths allow 8 MiB. Schema location count and path bytes are checked before path allocation; a syntactically valid oversized profile is refused as a complete result.
  • Each role uses either its pasted value or exactly one selected UTF-8 file; clear the selected file to paste. An empty or invalid active file never falls back to hidden pasted text. A filename label allows 512 UTF-8 bytes.
  • One leading BOM is removed and recorded, including pasted input. Invalid UTF-8, decoded duplicate JSON keys and unpaired Unicode surrogates are refused. Inputs stay in this browser.
  • A fixed 10-second whole-task deadline or cancellation returns no partial export. Rerun after correcting the input; a fresh Worker starts each job.
  • Every retained diagnostic entry, including parent wrappers and repeated four-field entries, stays in the complete report. keywordLocation is an evaluation path with local reference transitions, not an absolute resolved source pointer. Technical error text remains unchanged.
  • File contents are read only after Run, within the same fixed 10-second period as engine loading, checks and processing. Cancelling or exceeding any limit publishes no partial copy or download. Only the current tab holds the inputs in bounded memory.
  • The screen uses a bounded preview. Complete copied data and downloadable artifacts keep all diagnostics, ordered matches and source identity. Files and names are processed locally; no content upload or remote reference fetch.
Open Validate a JSON instance against a schema →