Description
Parse enumJson as a nonempty array, then return its length and whether any value is literal null.
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.
Parse enumJson as a nonempty array, then return its length and whether any value is literal null.
When to use this tool
Use JSON: JSON Schema Nullable Enum Flag when you need one explicit schema-keyword or membership component.
How to use the tool and how it works
- Enter enumJson. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read result. Expand result to inspect the returned fields.
Parse enumJson as a nonempty array, then return its length and whether any value is literal null.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| enumJson | Enum Json | Required. Text. Implementation limit: 8192 Unicode code points and 16384 UTF-16 code units. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| result | Result | Required. Object. |
| result.containsNull | Contains Null | Calculated result member: boolean. |
| result.enumSize | Enum Size | Calculated result member: number. |
{
"input": {
"enumJson": "[\"x\",null]"
},
"output": {
"result": {
"containsNull": true,
"enumSize": 2
}
}
} Limitations and assumptions
- Duplicates are counted and not rejected; this inspects one enum representation rather than a complete JSON 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
Similar or alternative tools
- JSON: JSON Scalar Type Tag
Parse valueJson, reject arrays and objects, and return null, boolean, number, or string as the scalar type.
- 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.