# Deeply nested JSON

**An object with 5 nested shapes.**

## Input

```json
{
  "org": {
    "team": {
      "project": {
        "settings": {
          "notifications": { "email": true, "slack": false }
        }
      }
    }
  }
}
```

## TypeScript

```typescript
export interface Root {
  org: Org;
}

export interface Org {
  team: Team;
}

export interface Team {
  project: Project;
}

export interface Project {
  settings: Setting;
}

export interface Setting {
  notifications: Notification;
}

export interface Notification {
  email: boolean;
  slack: boolean;
}
```

## Zod

```typescript
import { z } from 'zod';

export const NotificationSchema = z.object({
  email: z.boolean(),
  slack: z.boolean(),
});

export const SettingSchema = z.object({
  notifications: NotificationSchema,
});

export const ProjectSchema = z.object({
  settings: SettingSchema,
});

export const TeamSchema = z.object({
  project: ProjectSchema,
});

export const OrgSchema = z.object({
  team: TeamSchema,
});

export const RootSchema = z.object({
  org: OrgSchema,
});
```

## Warnings

### Nested 7 levels deep (info)

A single sample is weak evidence at this depth — the deeper a shape, the more likely some branch varies in a way this payload does not show.

**Fix:** Verify the deepest types against the source schema or a second sample.

---

Canonical URL: https://json-to-types.gumballtools.com/types/deeply-nested-json
JSON API: `POST https://json-to-types.gumballtools.com/api/v1/convert`
MCP endpoint: `https://json-to-types.gumballtools.com/api/mcp`
