# JSON unflattener

- Human page: https://happytails.ai/en/data-tools/json-unflattener/
- Markdown: https://happytails.ai/en/data-tools/json-unflattener.md
- Structured JSON: https://happytails.ai/agents/en/data-tools/json-unflattener/index.json
- Visibility: public

## Tool capabilities

| Property | Value |
| --- | --- |
| Tool ID | `json-unflattener` |
| Category | data-tools |
| Implementation | Registered implementation. Registration alone is not a production-quality guarantee. |
| Browser execution | Automatic updates after valid input or file selection. |
| Browser processing | Browser; see tool notes for network behavior. |
| HTTP API | Not callable through HTTP. |
| Browser-agent interface | run_current_tool |

### Implementation notes

Rebuild JSON from the happytails-json-paths-v1 document made by JSON flattener. Explicit container types preserve arrays and numeric object keys. Conflicting paths, missing parents and sparse array indices are rejected. Runs on your device. Up to 1,000,000 input characters, 50,000 values per JSON document and 64 nesting levels. Duplicate JSON keys, unsafe integers, negative zero and decimals that would change on JSON serialization are rejected rather than rounded. Quote precision-sensitive numbers as strings. Output whitespace and object-member order may change. Each JSON Pointer is limited to 20,000 characters.

### Inputs and settings

Text input: JSON input.

Example or placeholder shown in the interface (not a validated fixture):

```text
{"format":"happytails-json-paths-v1","records":[{"path":"","type":"object"},{"path":"/name","type":"string","value":"Ana"},{"path":"/tags","type":"array"},{"path":"/tags/0","type":"string","value":"blue"},{"path":"/empty","type":"object"}]}
```

Paste text to process locally. Review the result before downloading. Results update as you type. Up to 1,000,000 characters.

No additional settings are declared for this tool.

### Browser-agent workflow

1. Open the human page in a browser that supports WebMCP.
2. Discover the interface exposed by that page; use its actual schema.
3. Select files on the page first when the tool requires files.
4. Call `run_current_tool` with valid input and settings.
5. Inspect the returned result or error and the displayed output. Retrieve files from the displayed download links.

Calls do not automatically copy or download results. Browser permissions still apply. Interface availability alone is not proof of successful execution.

### Planning specification

Up to 1,000,000 input characters, 50,000 values per JSON document and 64 nesting levels. Duplicate keys, negative zero and numbers that cannot safely retain their decimal value are rejected. Quote precision-sensitive numbers as strings. Formatting and object member order may change. Processing stays on your device. Each JSON Pointer is limited to 20,000 characters.

This describes intended requirements. Use the implementation notes, interface schema and observed output to determine current support.

### Complete machine-readable capability record

```json
{
  "id": "json-unflattener",
  "category": "data-tools",
  "built": true,
  "requirements": "Up to 1,000,000 input characters, 50,000 values per JSON document and 64 nesting levels. Duplicate keys, negative zero and numbers that cannot safely retain their decimal value are rejected. Quote precision-sensitive numbers as strings. Formatting and object member order may change. Processing stays on your device. Each JSON Pointer is limited to 20,000 characters.",
  "implementation": {
    "fields": [],
    "live": true,
    "presentation": "metrics",
    "note": "Rebuild JSON from the happytails-json-paths-v1 document made by JSON flattener. Explicit container types preserve arrays and numeric object keys. Conflicting paths, missing parents and sparse array indices are rejected. Runs on your device. Up to 1,000,000 input characters, 50,000 values per JSON document and 64 nesting levels. Duplicate JSON keys, unsafe integers, negative zero and decimals that would change on JSON serialization are rejected rather than rounded. Quote precision-sensitive numbers as strings. Output whitespace and object-member order may change. Each JSON Pointer is limited to 20,000 characters.",
    "experience": {
      "automatic": true,
      "single": false,
      "inputMaxLength": 1000000,
      "inputMode": "text",
      "label": "JSON input",
      "placeholder": "{\"format\":\"happytails-json-paths-v1\",\"records\":[{\"path\":\"\",\"type\":\"object\"},{\"path\":\"/name\",\"type\":\"string\",\"value\":\"Ana\"},{\"path\":\"/tags\",\"type\":\"array\"},{\"path\":\"/tags/0\",\"type\":\"string\",\"value\":\"blue\"},{\"path\":\"/empty\",\"type\":\"object\"}]}",
      "help": "Paste text to process locally. Review the result before downloading. Results update as you type. Up to 1,000,000 characters.",
      "action": null
    },
    "mode": "automatic",
    "interactive": false
  },
  "execution": "Browser interface",
  "api": null,
  "browser_agent": {
    "supported": true,
    "name": "run_current_tool",
    "discovery": "WebMCP on the human page in a supporting browser",
    "verification": "See audit/API-AUDIT.md; availability is not verification"
  }
}
```

## Page guide

Rebuild nested JSON from typed JSON Pointer records. Detect conflicting paths, missing parents and incomplete arrays.

How can we improve this tool?

Report a problem or share an idea.

Please leave out private information. Your message and the tool name go to our team via PostHog.

### How to use JSON unflattener

1. Paste a complete path document from JSON flattener.
2. Review any path or type conflicts and correct the input.
3. Download the reconstructed JSON and report.

## Useful next steps

- [JSON flattener](https://happytails.ai/en/data-tools/json-flattener/) ([Markdown](https://happytails.ai/en/data-tools/json-flattener.md))

- [JSON path inventory](https://happytails.ai/en/data-tools/json-path-inventory/) ([Markdown](https://happytails.ai/en/data-tools/json-path-inventory.md))

- [JSON array grouper](https://happytails.ai/en/data-tools/json-array-grouper/) ([Markdown](https://happytails.ai/en/data-tools/json-array-grouper.md))

## Use the reversible path document

Paste the complete happytails-json-paths-v1 document created by JSON flattener. It includes a format field and records with path, type and, for scalar records, value. Other flat JSON conventions, including arbitrary dotted keys, are not accepted.

### Keep arrays and objects distinct

Explicit container records preserve empty containers and numeric object keys. Records may arrive in any order. Every child must have a matching object or array parent; array indices start at zero and must be contiguous without leading zeros.

### Resolve conflicts before exporting

Duplicate paths, missing parents, children under scalar values and type mismatches block reconstruction. The tool returns a fixed error report rather than a partial document. Once the paths are consistent, download the reconstructed JSON.
