Description
Parse json as an array and scan backward while elements are literal null.
JSON distinguishes null, strings, numbers, Booleans, arrays, and objects. Parsing a token produces a value whose type can differ from its apparent textual spelling.
Parse json as an array and scan backward while elements are literal null.
When to use this tool
Use JSON Array Null Tail Cardinality when you need one bounded JSON value classification or wrapper operation.
How to use the tool and how it works
- Enter json. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read length, trailingNulls. Use the output convention below.
Parse json as an array and scan backward while elements are literal null. Return total length and trailingNulls.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| json | Json | Required. Text; maximum UTF-16 length 8192. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| length | Length, count, or code length under the stated domain and unit convention. | Required. Safe integer. |
| trailingNulls | Trailing Nulls | Required. Safe integer. |
{
"input": {
"json": "[1,null,null]"
},
"output": {
"length": 3,
"trailingNulls": 2
}
} Limitations and assumptions
- Interior nulls and strings spelling null do not extend the terminal null run; no elements are removed.
- 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 full document parser and the consuming schema when complete validation or exact numeric preservation is required.
References
Similar or alternative tools
- JSON Array Singleton Unwrapper
Parse json as an array, require exactly one element, and serialize that element into valueJson.
- JSON: JSON Schema Nullable Enum Flag
Parse enumJson as a nonempty array, then return its length and whether any value is literal null.