Skip to content

Main content

JSON Schema Property Name Empty Flag Tool

Keep valid empty JSON property names distinct from a caller-imposed nonempty-name policy.

Loading tool…

Description

Report whether name is empty and whether requiredNames contains it.

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.

Report whether name is empty and whether requiredNames contains it.

When to use this tool

Use JSON Schema Property Name Empty Flag when you need one explicit schema-keyword or membership component.

How to use the tool and how it works

  1. Enter name, requiredNames, allowEmpty. 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 empty, listedRequired, permittedByPolicy. Inspect empty, listedRequired, permittedByPolicy before interpreting the associated values.

Report whether name is empty and whether requiredNames contains it. permittedByPolicy is true for a nonempty name or when allowEmpty is true.1

Input fieldMeaning and unitsAccepted input
nameNameRequired. Text; maximum UTF-16 length 8192.
requiredNamesRequired NamesRequired. Array of text; maximum UTF-16 length 8192; maximum items 256.
allowEmptyAllow EmptyRequired. Boolean.
Output fieldInterpretationReturned shape
emptyWhether the represented collection or span has no occupied elements.Required. Boolean.
listedRequiredListed RequiredRequired. Boolean.
permittedByPolicyPermitted By PolicyRequired. Boolean.
json
{
  "input": {
    "name": "",
    "requiredNames": [
      ""
    ],
    "allowEmpty": true
  },
  "output": {
    "empty": true,
    "listedRequired": true,
    "permittedByPolicy": true
  }
}

Limitations and assumptions

  • An empty JSON object key is syntactically possible; the caller's policy is separate from required-list membership and schema validity.
  • 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-property-name-empty-flag — tool.io

Similar or alternative tools