JSON record unflattener
The JSON unflattener is the reverse of the JSON flattener. It takes the flat path records and rebuilds the original nested JSON, checking the records carefully instead of guessing.
- Runs in your browser
- Free, no account needed
- Copy or download the result
Result
Example
{"format":"json-pointer-records-v1","records":[{"path":"","type":"object"},{"path":"/name","type":"string","value":"Ada"},{"path":"/tags","type":"array"},{"path":"/tags/0","type":"string","value":"data"}]}{
"name": "Ada",
"tags": [
"data"
]
}How to use the json record unflattener
- Paste the records into the JSON Pointer records from JSON flattener box.
- Check that the outer object still has its format and records fields.
- Press Run to rebuild the JSON.
- Press Copy result, or Download to save it.
How it works
The input must be an object with format set to json-pointer-records-v1 and a nonempty records list, as made by the JSON flattener.
Records can be in any order. A root record with an empty path is required, and every other record needs an object or array parent.
Each record may only have path, type and value. Objects and arrays have no value, and other values must match their stated type.
Duplicate paths, bad pointer escapes and arrays with missing positions are rejected. Array positions must be whole numbers under 100,000.
Paths can be at most 100 levels deep.
Everything runs in your browser. Your input is not uploaded or stored.
Questions and answers
How do I unflatten JSON?
Flatten your data with the JSON flattener, edit the records if needed, then paste them here and press Run. The nested JSON is rebuilt from the paths.
Can I unflatten dot notation keys like a.b.c?
No. This tool only reads the JSON Pointer record format made by the JSON flattener.
Why do I get a sparse array error?
An array is missing one of its positions, such as /tags/0 and /tags/2 without /tags/1. Add the missing record or make the parent an object.
Is my data uploaded?
No. The records are rebuilt in your browser, and nothing is sent over the network.