Skip to content

Main content

JSON Schema Required Single Key Check Tool

Calculate json schema required single key check from explicit caller-supplied inputs.

Loading tool…

Description

Parse objectJson as a plain JSON object and test Object.hasOwn for the literal key.

A JSON member can be absent, present with null, or present with an empty string. Testing own-property presence preserves those distinctions instead of relying on truthiness.

Parse objectJson as a plain JSON object and test Object.hasOwn for the literal key.

When to use this tool

Use JSON Schema Required Single Key Check when you need an explicit object-member presence or key comparison.

How to use the tool and how it works

  1. Enter objectJson, key. 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 present. Inspect present before interpreting the associated values.

Parse objectJson as a plain JSON object and test Object.hasOwn for the literal key.1

Input fieldMeaning and unitsAccepted input
objectJsonObject JsonRequired. Text; maximum UTF-16 length 8192.
keyJSON-array serialization of the stated identifying fields, preserving exact strings.Required. Text; maximum UTF-16 length 8192.
Output fieldInterpretationReturned shape
presentPresentRequired. Boolean.
json
{
  "input": {
    "objectJson": "{\"x\":null}",
    "key": "x"
  },
  "output": {
    "present": true
  }
}

Limitations and assumptions

  • A present key with null or another falsy value still counts; this is not a complete JSON Schema validation.
  • 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

Use a complete schema and document comparison when conditional requirements or nested structures matter.

References

  1. Calculation and input contract: json/json-schema-required-single-key-check — tool.io

Similar or alternative tools