Skip to content

Main content

JSON: JSON Empty String Versus Missing Tag Tool

Distinguish missing property, explicit empty string and explicit null in one parsed JSON object using own-member presence, not truthiness.

Loading tool…

Description

Parse objectJson as an object and classify the literal key as missing, empty-string, null, or other using own-property presence before value checks.

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 an object and classify the literal key as missing, empty-string, null, or other using own-property presence before value checks.

When to use this tool

Use JSON: JSON Empty String Versus Missing Tag 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 result. Expand result to inspect the returned fields.

Parse objectJson as an object and classify the literal key as missing, empty-string, null, or other using own-property presence before value checks.1

Input fieldMeaning and unitsAccepted input
objectJsonObject JsonRequired. Text. Implementation limit: 8192 Unicode code points and 16384 UTF-16 code units.
keyJSON-array serialization of the stated identifying fields, preserving exact strings.Required. Text. Implementation limit: 8192 Unicode code points and 16384 UTF-16 code units.
Output fieldInterpretationReturned shape
resultResultRequired. Object.
result.stateStateCalculated result member: string.
json
{
  "input": {
    "objectJson": "{\"a\":\"\"}",
    "key": "a"
  },
  "output": {
    "result": {
      "state": "empty-string"
    }
  }
}

Limitations and assumptions

  • These states are distinct; this does not normalize keys or interpret other falsy values as missing.
  • 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

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

References

  1. Calculation and input contract: json/json-empty-string-versus-missing-tag — tool.io

Similar or alternative tools