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
- Enter objectJson, key. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- 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 field | Meaning and units | Accepted input |
|---|---|---|
| objectJson | Object Json | Required. Text; maximum UTF-16 length 8192. |
| key | JSON-array serialization of the stated identifying fields, preserving exact strings. | Required. Text; maximum UTF-16 length 8192. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| present | Present | Required. Boolean. |
{
"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
Similar or alternative tools
- JSON: JSON Empty String Versus Missing Tag
Parse objectJson as an object and classify the literal key as missing, empty-string, null, or other using own-property presence before value checks.
- JSON: JSON Schema Required Member Flag
Reject duplicate requiredMembers and test exact membership of memberName in that supplied list.