> For the complete documentation index, see [llms.txt](https://docs.meganova.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.meganova.ai/character-studio/import-export/json-format.md). Agents can also search and read this documentation through its [MCP server](https://docs.meganova.ai/~gitbook/mcp).

# JSON Format

> **Note:** JSON export provides raw character data without image embedding. Use it for backups, manual editing, or when you need direct data access.

## Overview

JSON format:

* **Raw data** without image embedding
* **Human-readable** and editable
* **Lightweight** — just the data
* **Compatible** with most tools

## Exporting JSON

### Step 1: Open Export

1. Open character in Character Studio
2. Click **Export**
3. Select **JSON**

### Step 2: Download

1. Click **Download JSON**
2. File saves as `[character-name].json`

### Alternative: Copy to Clipboard

1. Click **Copy JSON**
2. Paste into editor or other tool

## Importing JSON

### Step 1: Access Import

1. Click **Create** → **Import**
2. Select **JSON** tab

### Step 2: Upload or Paste

**Upload file:**

1. Drag and drop, or browse
2. Select JSON file

**Paste data:**

1. Click **Paste JSON**
2. Paste from clipboard

### Step 3: Review and Import

1. Preview extracted data
2. Click **Import**
3. Character opens in editor

## JSON Structure

### Basic Structure

```json
{
  "name": "Elena",
  "description": "A wise elven wizard...",
  "personality": "Thoughtful, patient...",
  "scenario": "An ancient magical library...",
  "first_mes": "*Elena looks up from her ancient tome*",
  "mes_example": "{{user}}: What is magic?\n{{char}}: Magic is..."
}
```

### Full Structure (CCv3)

```json
{
  "spec": "chara_card_v3",
  "spec_version": "3.0",
  "data": {
    "name": "Elena",
    "description": "A wise elven wizard with silver hair...",
    "personality": "Thoughtful, patient, mysterious, kind...",
    "scenario": "The ancient Library of Shadows...",
    "first_mes": "*Elena looks up from her ancient tome*",
    "mes_example": "{{user}}: What is magic?\n{{char}}: *adjusts her spectacles*",
    "creator_notes": "Created for fantasy roleplay...",
    "system_prompt": "You are Elena, a 200-year-old elven wizard...",
    "post_history_instructions": "Remember to stay in character...",
    "alternate_greetings": [
      "*Elena greets you warmly*",
      "*Elena barely acknowledges your presence*"
    ],
    "tags": ["fantasy", "wizard", "elf", "mentor"],
    "creator": "username",
    "character_version": "1.0",
    "extensions": {}
  }
}
```

## Field Reference

### Core Fields

| Field         | Type   | Description                      |
| ------------- | ------ | -------------------------------- |
| `name`        | string | Character name                   |
| `description` | string | Physical description, background |
| `personality` | string | Personality traits               |
| `scenario`    | string | Conversation setting             |
| `first_mes`   | string | Opening message                  |
| `mes_example` | string | Example dialogues                |

### Extended Fields (CCv3)

| Field                       | Type   | Description                |
| --------------------------- | ------ | -------------------------- |
| `system_prompt`             | string | Custom system instructions |
| `post_history_instructions` | string | Post-history prompt        |
| `alternate_greetings`       | array  | Alternative first messages |
| `tags`                      | array  | Categories/tags            |
| `creator_notes`             | string | Notes for other creators   |
| `character_version`         | string | Version identifier         |

### Embedded Lorebook

```json
{
  "character_book": {
    "name": "Elena's World",
    "entries": [
      {
        "keys": ["library", "shadows"],
        "content": "The Library of Shadows is...",
        "enabled": true,
        "priority": 5
      }
    ]
  }
}
```

## Editing JSON

### Manual Editing

1. Export JSON
2. Open in text editor
3. Modify fields
4. Save file
5. Re-import to Character Studio

### Tips for Editing

* **Validate JSON** — Use a JSON validator
* **Escape quotes** — Use `\"` within strings
* **Preserve structure** — Don't remove required fields
* **Mind newlines** — Use `\n` for line breaks

### Example Edit

Before:

```json
{
  "personality": "Kind and patient"
}
```

After:

```json
{
  "personality": "Kind, patient, slightly sarcastic, loves tea"
}
```

## Common Use Cases

### Backup

1. Export JSON regularly
2. Store in secure location
3. Version control with Git (optional)

### Bulk Editing

1. Export multiple characters
2. Use scripts to modify
3. Re-import changes

### Migration

1. Export from one account
2. Import to another account
3. Or move between platforms

### Development

1. Edit in IDE
2. Use version control
3. Programmatic character creation

## Format Compatibility

### Import Sources

Character Studio imports JSON from:

* Other Character Studio exports
* SillyTavern character files
* TavernAI exports
* Custom JSON files

### Required Fields

Minimum for import:

```json
{
  "name": "Character Name"
}
```

All other fields are optional.

### Field Mapping

If source uses different field names:

| Common Alternative | Maps To       |
| ------------------ | ------------- |
| `char_name`        | `name`        |
| `char_persona`     | `description` |
| `greeting`         | `first_mes`   |
| `example_dialogue` | `mes_example` |

## Troubleshooting

### Import fails

**Check:**

* Valid JSON syntax
* File isn't corrupted
* Required fields present

**Tools:**

* JSONLint (online validator)
* VS Code (syntax highlighting)

### Data looks wrong after import

**Check:**

* Encoding (UTF-8 recommended)
* Escaped characters
* Line breaks

### Characters don't display

**Check:**

* Unicode characters
* Special characters escaped
* File encoding matches editor

## See Also

* [Character Cards](https://docs.meganova.ai/character-studio/import-export/character-cards.md) — PNG with embedded data
* [Character Asset Kit](https://docs.meganova.ai/character-studio/import-export/character-asset-kit.md) — Complete bundles
* [Character Specs](https://docs.meganova.ai/character-studio/advanced/character-specs.md) — Full specification
