---
title: Document
description: The top-level object of a .owlf.json file.
---

Every OWLF file is one JSON object. It declares the spec version, the app it came from, the app's scales and the entries.

## Minimal document

```json data.owlf.json
{
  "$schema": "https://owlf.org/schema/0.1.json",
  "owlf": "0.1",
  "source": { "app": "daylio", "name": "Daylio" },
  "scales": {
    "mood": {
      "size": 5,
      "levels": [
        { "id": "awful", "label": "awful", "position": 0 },
        { "id": "bad", "label": "bad", "position": 1 },
        { "id": "meh", "label": "meh", "position": 2 },
        { "id": "good", "label": "good", "position": 3 },
        { "id": "rad", "label": "rad", "position": 4 }
      ]
    },
    "sleep": null
  },
  "entries": [],
  "warnings": []
}
```

A full example with one entry: [minimal.owlf.json](/minimal.owlf.json).

## Fields

| Field | Required | Purpose |
| --- | --- | --- |
| `owlf` | Yes | Spec version, `"0.1"`. |
| `$schema` | No | Link to the JSON Schema. |
| `source.app` | Yes | Adapter id, kebab-case: `daylio`, `how-we-feel`. |
| `source.name` | Yes | App name as the store lists it. |
| `source.generator` | No | Package and version that wrote the file, e.g. `@owlf/adapter-daylio@0.1.0`. |
| `scales.mood` | Yes | The app's mood [scale](/format/scales), or `null` when the app has no mood rating. |
| `scales.sleep` | Yes | The app's sleep scale, or `null`. |
| `entries` | Yes | Array of [entries](/format/entries). |
| `warnings` | Yes | File-level notes for people, e.g. "2 files ignored". |

## Unknown fields

The schema is closed. An unknown field makes the document invalid, so typos surface instead of silently losing data. New fields arrive with a new spec version, see [versioning](/reference/versioning).

## File

- **Extension**: `.owlf.json`, UTF-8.
- **Media type**: `application/vnd.owlf+json`.
- **Schema**: [schema/0.1.json](/schema/0.1.json). The [specification](/reference/specification) governs if the two conflict.
