Skip to content

Main content

JSON Pointer Relative Up Count Field Tool

Compute json pointer relative up count field from explicit bounded inputs.

Loading tool…

Description

Parse a canonical nonnegative up count of at most nine digits followed by hash, a slash path, or nothing.

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 a canonical nonnegative up count of at most nine digits followed by hash, a slash path, or nothing.

When to use this tool

Use JSON Pointer Relative Up Count Field 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 up, remainder, indexQuery. Inspect indexQuery before interpreting the associated values.

Parse a canonical nonnegative up count of at most nine digits followed by hash, a slash path, or nothing. Return up, remainder, and indexQuery for a hash remainder.1

Input fieldMeaning and unitsAccepted input
pointerPointer text in the exact syntax accepted by this tool.Required. Text; maximum UTF-16 length 8192.
Output fieldInterpretationReturned shape
upCanonical ancestor count parsed from at most nine digits; not an executed traversal.Required. Safe integer.
remainderRemainderRequired. Text; maximum UTF-16 length 8192.
indexQueryIndex QueryRequired. Boolean.
json
{
  "input": {
    "pointer": "2/foo"
  },
  "output": {
    "up": 2,
    "remainder": "/foo",
    "indexQuery": false
  }
}

Limitations and assumptions

  • This is a bounded relative-pointer token parser without a current document location or ancestor traversal.
  • 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-relative-up-count-field — tool.io

Similar or alternative tools