Nested structure restored
Turn explicit paths back into objects and contiguous arrays with original scalar types.
Start typing to search 227 tools.
Rebuild nested JSON objects and arrays from a reversible $-rooted flat path map with collision checks, escaped property names, and strict contiguous array indexes.
JSON Unflatten reverses the path map generated by Trexmi JSON Flatten. A path begins with $, uses a dot or slash for object properties, and uses brackets for array indexes. The values in the flat object become leaves in the reconstructed tree.
The processor refuses ambiguous input instead of silently replacing data. A property cannot be both a scalar leaf and the parent of another path. Object properties cannot conflict with array indexes, and an array must contain every index from zero without gaps. Empty objects and arrays can be restored directly from leaf values.
$.user.name or slash for $/user/name.Focused controls, predictable output, and a workflow designed around this exact transformation.
Turn explicit paths back into objects and contiguous arrays with original scalar types.
Stop when one path would overwrite another path or change a container type.
Restore property names that contain separators, brackets, or backslashes.
Serialize the completed tree as readable JSON only after all paths pass structural checks.
Practical details about input, output, privacy, limits, and the best way to use this tool.
The input must be a JSON object whose property names follow the Trexmi $-rooted flat-path grammar and whose property values are the leaves to restore.
Yes. Selecting slash for dot paths or dot for slash paths changes how object-property boundaries are parsed.
Bracket tokens such as [0] create arrays. Separator-prefixed segments such as .0 create object properties, even when the property name contains digits.
JSON arrays are ordered sequences. Rejecting a map that begins at index 2 avoids silently adding null values or serializing the structure as an object.
Yes. This is how a root scalar, null, empty array, or empty object is represented. The root path cannot be combined with child paths.
A collision occurs when one path is an ancestor of another leaf or when the same container must be both an object and an array. The operation stops before overwriting either value.
No. Trexmi uses its own reversible dot-or-slash grammar with bracketed array indexes. JSON Pointer uses a different slash syntax and different escaping rules.
No. The result is syntactically valid JSON, but required fields, value formats, allowed enums, and business rules still need schema or application validation.
Learn JSON objects, arrays, value types, validation, formatting, parsing, API workflows, and common syntax errors.
All paths share the same object parent and scalar types remain intact.
{"$.customer.id":42,"$.customer.name":"Lin","$.customer.active":true}
{"customer":{"id":42,"name":"Lin","active":true}}
Contiguous zero-based indexes become a JSON array in the specified order.
{"$.tags[0]":"json","$.tags[1]":"tools","$.tags[2]":"api"}
{"tags":["json","tools","api"]}
The doubled JSON backslash decodes to one path escape, so the first dot belongs to the property name.
{"$.release\\.version.major":2}
{"release.version":{"major":2}}
The same location cannot be both a string and an object containing another property.
{"$.user":"Ada","$.user.name":"Ada Lovelace"}
Error: Path conflict: an existing leaf is also an ancestor of $.user.name.
Every path starts at $. The selected separator introduces an object property, and [number] introduces an array position. A backslash escapes the next character inside a property segment. The parser requires the complete path to follow this grammar; unexpected text after a root, property, or array index is reported as an error.
The safest source is output copied directly from JSON Flatten. Hand-written maps are supported, but escaping and separator choices must be consistent.
Consider $.account with the value false and $.account.id with the value 7. Reconstructing both would require replacing the boolean with an object. Older unflatten implementations often do this silently. Trexmi detects ancestor, descendant, and container-type conflicts before returning output.
When a conflict appears, decide which source field is authoritative. Renaming paths or changing a scalar to an object is a data-model decision, not a formatting fix.
An array must begin at index zero and continue without gaps. A map containing [0] and [2] but no [1] is rejected. This avoids inventing a missing value. If the numeric labels are identifiers rather than positions, encode them as object properties using the selected separator.
Use JSON Pointer Tester to resolve a standardized pointer against the reconstructed output, and JSON Formatter to inspect the final document.
The tool does not infer a business schema, merge duplicate records, coerce dates, normalize numbers, or verify that a path map came from the same version of another application. Duplicate property names already collapsed by a JSON parser cannot be recovered. Input size, depth, and array-index limits protect the server from pathological documents.
Review JSON RFC 8259 for JSON syntax and interoperability. Review JSON Pointer RFC 6901 when another system explicitly requires standard pointer syntax instead of this flat-map convention.
Run the reconstructed document through JSON Validator, then validate it against the receiving API or database schema.