JSON Key Paths vs JSON Pointer

A key path lists where a field sits, and it drops array indexes. A JSON Pointer addresses one value, and a slash inside a key is written as ~1.

Two ways to name a location

JSON key paths vs JSON pointer is a question about what you are holding. You already know where the value sits. The remaining choice is whether you want a list of field shapes, or one standard address that returns that value. Those are different strings. Pasting one into the other tool will not work, and neither string is JSONPath.

A key path from the JSON Key Extractor is a summary: object keys joined with dots, and arrays written as [] so two elements do not produce two copies of the same field. It does not keep the index, and it does not look up a value. A JSON Pointer on the JSON Pointer Resolver is an RFC 6901 address. An empty pointer selects the whole document. Every other pointer starts with /, and each token is one member or one array index. The page returns that value as JSON text. A missing member is an error. It is not shown as null.

One document, two spellings

This document has an array and a key that itself contains a slash:

{
  "items": [
    { "a/b": "first" },
    { "a/b": "second" }
  ]
}

Key paths for that value are:

items
items[].a/b

items is the root key. items[].a/b is the field inside each element. The [] means “an element of this array,” not element 0 and not element 1. The second object repeats a/b, so the path is listed once. The slash is still the character in the key. Nothing escaped it. If you read that line as a pointer, the slash looks like another separator. It is not. It is part of the name a/b.

The pointer for the second element’s value is /items/1/a~1b. 1 is the index, and indexes start at 0, so 1 is "second". /items/0/a~1b is "first". The same document, the same key, two addresses, because a pointer keeps the index that the key path threw away.

Why the slash is escaped in a pointer

A pointer splits on /. A key that contains / cannot be written with a raw slash or the split will invent an extra token. RFC 6901 writes that slash as ~1. A tilde in a key is ~0. When the pointer is read, ~1 is turned back into / before ~0 is turned back into ~, so ~01 stays a tilde followed by 1 rather than becoming a slash. In the example, a~1b is the key a/b.

/items/0/a/b is a different address. After 0 it looks for a member named a, then a member named b. This document has neither. The resolver reports that the member is missing. It does not guess that you meant the slash inside a/b.

Two smaller rules matter when you type the index. On an array, 0 and a decimal without a leading zero select an existing element. 01 is an error on an array. The token - is also an error on this page. It does not mean “the last element,” and the page does not apply a JSON Patch.

JSON Pointer is not JSONPath

JSONPath is a query language, with its own filters and its own way of writing a descent. This site does not run JSONPath. The key extractor says so on the page: users[].name is a structural list, not a query. The pointer resolver will not accept that spelling either. A pointer that does not start with / is rejected, and [] is not an index.

If you were given $.items[1]['a/b'] or items[].a/b or /items/1/a~1b, you have three notations. Only the last one is a JSON Pointer. Only the middle one is what the extractor prints. The first is a JSONPath expression, and there is no YallaSolve page that evaluates it.

Which page answers which question

Open the extractor when you need the vocabulary of a payload: the names, or the path lines, including a repeated field shown once. Open the resolver when someone handed you a pointer, or you need the value at one index, including a key that contains a slash. If you have not yet seen the nesting, how to work with nested JSON is the walk from a parsed tree to a path list. Come back here when the remaining doubt is the spelling of the address.

Do not convert by replacing dots with slashes. items[].a/b and /items/1/a~1b describe the same region of this document only after you choose an index and escape the slash. Skip either step and you are naming a different location, or no location at all.

On this page

Related guides

Related solutions

Related articles

Need a tool for this ?

Open the free tools — no signup.

FAQs

newsletter signup

Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Innovative Solutions For Modern Needs
Copyright © 2026 Yallasolve. all rights reserved.