Skip to content

Main content

JSON: JSON Pointer Empty Token Label Tool

Distinguish a root pointer from empty member-name tokens using the existing strict RFC6901 token parser.

Loading tool…

Description

Parse pointer through the shared pointer helper.

JSON Pointer separates path tokens with slashes and escapes literal slash and tilde inside member names. The empty pointer denotes the document root; an empty token can name an actual empty-string member.

Parse pointer through the shared pointer helper.

When to use this tool

Use JSON: JSON Pointer Empty Token Label when you need a pointer token, depth, or representation check.

How to use the tool and how it works

  1. Enter pointer. 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 pointer through the shared pointer helper. Return root for zero tokens, every zero-based index of an empty decoded token, and tokenCount.1

The linked pointer-token parser is invoked through the shared helper and supplies decoded tokens, including empty member names.2

Input fieldMeaning and unitsAccepted input
pointerPointer text in the exact syntax accepted by this tool.Required. Text. Implementation limit: 8192 Unicode code points and 16384 UTF-16 code units.
Output fieldInterpretationReturned shape
resultResultRequired. Object.
result.rootWhether the pointer identifies the whole document root.Calculated result member: boolean.
result.emptyMemberTokenIndicesEmpty Member Token IndicesCalculated result member: array.
result.tokenCountNumber of parsed pointer reference tokens; root has none.Calculated result member: number.
json
{
  "input": {
    "pointer": "/"
  },
  "output": {
    "result": {
      "root": false,
      "emptyMemberTokenIndices": [
        0
      ],
      "tokenCount": 1
    }
  }
}

Limitations and assumptions

  • Empty member tokens differ from the root pointer; no object or array is traversed.
  • 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 pointer parser and resolve against the actual document when existence or array access matters.

References

  1. Calculation and input contract: json/json-pointer-empty-token-label — tool.io

  2. Calculation or validation: json/pointer-token-list-parser — tool.io

Similar or alternative tools