Skip to content

Main content

JSON: JSON Schema Required Member Flag Tool

Check one member against an explicitly supplied JSON Schema required-name array, rejecting duplicate declarations and not evaluating an entire schema.

Loading tool…

Description

Reject duplicate requiredMembers and test exact membership of memberName in that supplied list.

A JSON Schema keyword expresses one constraint on an instance. Required-list membership, property naming, numeric bounds, and enum contents are distinct checks within a larger schema.

Reject duplicate requiredMembers and test exact membership of memberName in that supplied list.

When to use this tool

Use JSON: JSON Schema Required Member Flag when you need one explicit schema-keyword or membership component.

How to use the tool and how it works

  1. Enter requiredMembers, memberName. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read result. Expand result to inspect the returned fields.

Reject duplicate requiredMembers and test exact membership of memberName in that supplied list.1

Input fieldMeaning and unitsAccepted input
requiredMembersRequired MembersRequired. Array of text. Implementation limit: 128 items.
memberNameMember NameRequired. Text. Implementation limit: 8192 Unicode code points and 16384 UTF-16 code units.
Output fieldInterpretationReturned shape
resultResultRequired. Object.
result.requiredRequiredCalculated result member: boolean.
json
{
  "input": {
    "requiredMembers": [
      "a",
      "b"
    ],
    "memberName": "a"
  },
  "output": {
    "result": {
      "required": true
    }
  }
}

Limitations and assumptions

  • This reports whether a name is listed as required, not whether an actual object contains it or satisfies a schema.
  • Outputs are nested inside result. Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.

Alternative or Complementary methods

Validate the complete schema and instance using the intended dialect before treating a local check as conformance.

References

  1. Calculation and input contract: json/json-schema-required-member-flag — tool.io

Similar or alternative tools