Skip to content
All references

JSON reference

JSON Pointer & Reversible Flattening

Read JSON Pointer paths and understand a reversible object-flattening format that preserves arrays and empty containers.

8 of 8 entries

Paths

The root pointer

""

An empty pointer identifies the complete JSON value. A slash by itself identifies a property with an empty name.

Paths

Separate property names with slashes

/user/name

Each segment selects a property or, in standard pointer evaluation, an array element. The flattener uses these paths as object-map keys.

Escaping

Escape a slash in a name

Property a/b → /a~1b

A slash inside one property name is encoded as ~1 so it is not interpreted as a segment separator.

Escaping

Escape a tilde in a name

Property a~b → /a~0b

Encode a literal tilde as ~0. Dots in property names need no special treatment in a JSON Pointer.

Paths

JSON Pointer is not JSONPath

Pointer: /users/0/name
JSONPath: $.users[0].name

These are different syntaxes. Use JSON Path Explorer for expressions and JSON Flattener for the documented pointer-map transformation.

BigForgeKit format

Keep arrays as values

{"/user/tags":["reader","editor"]}

The flattener preserves an entire array as a value instead of guessing array types from numeric property names.

BigForgeKit format

Preserve empty containers

{"/settings":{},"/items":[]}

Empty objects and arrays would disappear if only primitive leaves were retained. Keeping them as values makes the round trip reversible.

BigForgeKit format

Reject conflicting paths

{"/a":1,"/a/b":2}

A value cannot simultaneously be a leaf and a parent in this format. Restore mode reports the conflict instead of silently overwriting data.