JSON flatten & rebuild
Create a reversible typed JSON Pointer manifest and rebuild the original structure.
A clear answer. Here’s how.
Flattening emits one path/type record for each value, including containers, with leaf values preserved exactly. Container markers distinguish arrays from numeric-keyed objects and retain empty arrays/objects. Rebuilding requires the root first, parents before children, unique paths and consecutive array indices. Up to 10,000 manifest records; ordinary JSON node/size/depth limits also apply. Choose rebuild and paste a manifest produced by flattening.
See a worked example
Worked example
A fixed demonstration, separate from the values you enter above.
- Direction
- JSON → typed pointer manifest
- JSON document
- {"name":"Ada","items":[{"id":9007199254740993,"active":true},{"id":2,"active":false}],"settings":{"theme":"blue"}}
Example result
[
{
"path": "",
"type": "object"
},
{
"path": "/name",
"type": "string",
"value": "Ada"
},
{
"path": "/items",
"type": "array"
},
{
"path": "/items/0",
"type": "object"
},
{
"path": "/items/0/id",
"type": "number",
"value": 9007199254740993
},
{
"path": "/items/0/active",
"type": "boolean",
"value": true
},
{
"path": "/items/1",
"type": "object"
},
{
"path": "/items/1/id",
"type": "number",
"value": 2
},
{
"path": "/items/1/active",
"type": "boolean",
"value": false
},
{
"path": "/settings",
"type": "object"
},
{
"path": "/settings/theme",
"type": "string",
"value": "blue"
}
]Typed JSON Pointer manifests preserve arrays, numeric object keys, empty containers and exact numeric tokens.