Skip to main content

Loom file

DataLoom saves application data in JSON format. It is stored in a file with a .loom extension.

When updating DataLoom, your loom file will be migrated to the latest plugin version. It is possible that this might fail.

To fix a broken loom file, please follow the instructions below.

Fixing a broken file

  1. Open the file in a text editor
  2. Review each line of the file, making sure that it matches the current JSON format
  3. For each line that doesn't match, make the necessary corrections. The problem is often that a key is missing or misspelled

Note: If you are not sure what to do, please open an issue in the GitHub repository. Paste the error details. You can get this by clicking the Copy error details button.

Format guide

  • string - a string of characters - "hello world". Always include double quotations.
  • number - a number - 123
  • boolean - true or false
  • null - a null value - null
  • [] - a list of values - [1, 2, 3]

A word with a capital letter such as CellType or Column represents a reference to a JSON object or enum.

Current format

{
"model": {
"columns": Column[],
"rows": Row[],
"filters": Filter[],
"settings": {
"numFrozenColumns": number,
"showCalculationRow": boolean
}
},
"pluginVersion": string
}
interface Column {
id: string;
sortDir: SortDir;
isVisible: boolean;
width: string;
type: CellType;
numberPrefix: string;
numberSuffix: string;
numberSeparator: string;
content: string;
numberFormat: NumberFormat;
currencyType: CurrencyType;
dateFormat: DateFormat;
shouldWrapOverflow: boolean;
tags: Tag[];
calculationType: CalculationType;
aspectRatio: AspectRatio;
horizontalPadding: PaddingSize;
verticalPadding: PaddingSize;
}
interface Row {
id: string;
index: number;
creationTime: number;
lastEditedTime: number;
cells: Cell[];
}
interface Cell {
id: string;
columnId: string;
isExternalLink: boolean;
dateTime: number | null;
content: string;
tagIds: string[];
}
interface Tag {
id: string;
content: string;
color: Color;
}
interface Filter {
id: string;
columnId: string;
operator: FilterOperator;
isEnabled: boolean;
...
}
enum CellType {
TEXT = "text",
EMBED = "embed",
FILE = "file",
NUMBER = "number",
TAG = "tag",
MULTI_TAG = "multi-tag",
DATE = "date",
CHECKBOX = "checkbox",
CREATION_TIME = "creation-time",
LAST_EDITED_TIME = "last-edited-time",
}
enum NumberFormat {
NUMBER = "number",
CURRENCY = "currency",
}
enum Color {
LIGHT_GRAY = "light gray",
GRAY = "gray",
BROWN = "brown",
ORANGE = "orange",
YELLOW = "yellow",
GREEN = "green",
BLUE = "blue",
PURPLE = "purple",
PINK = "pink",
RED = "red",
}
enum CurrencyType {
ARGENTINA = "ARS",
AUSTRALIA = "AUD",
CANADA = "CAD",
COLOMBIA = "COP",
DENMARK = "DKK",
UAE = "AED",
EUROPE = "EUR",
ICELAND = "ISK",
ISRAEL = "ILS",
MEXICO = "MXN",
NORWAY = "NOK",
GREAT_BRITAIN = "GBP",
BRAZIL = "BRL",
SAUDI_ARABIA = "SAR",
RUSSIA = "RUB",
INDIA = "INR",
SINGAPORE = "SGB",
SWEDEN = "SEK",
SWITZERLAND = "CHF",
UNITED_STATES = "USD",
SOUTH_KOREA = "KRW",
JAPAN = "JPY",
CHINA = "CNY",
}
type FilterOperator = "and" | "or";

Example file

This is an example of a loom file. It contains a table with two columns and one row. The first column is a text column. The second column is a tag column.

{
"model": {
"columns": [
{
"id": "637bedf7-22df-4d9e-be39-722e28ad9147",
"sortDir": "default",
"isVisible": true,
"width": "140px",
"type": "text",
"numberPrefix": "",
"numberSuffix": "",
"numberSeparator": "",
"content": "New Column",
"numberFormat": "number",
"currencyType": "USD",
"dateFormat": "mm/dd/yyyy",
"shouldWrapOverflow": true,
"tags": [],
"calculationType": "none",
"aspectRatio": "unset",
"horizontalPadding": "unset",
"verticalPadding": "unset"
},
{
"id": "8456b494-fb1c-42b6-a55d-a0d4db5a6c98",
"sortDir": "default",
"isVisible": true,
"width": "140px",
"type": "tag",
"numberPrefix": "",
"numberSuffix": "",
"numberSeparator": "",
"content": "New Column",
"numberFormat": "number",
"currencyType": "USD",
"dateFormat": "mm/dd/yyyy",
"shouldWrapOverflow": true,
"tags": [
{
"id": "be98ee4e-0f55-4d07-873d-7573b65fb695",
"markdown": "tag1",
"color": "gray"
}
],
"calculationType": "none",
"aspectRatio": "unset",
"horizontalPadding": "unset",
"verticalPadding": "unset"
}
],
"rows": [
{
"id": "f4c063b9-a456-4d1c-81ef-0e1dd950103e",
"index": 0,
"creationTime": 1695580079305,
"lastEditedTime": 1695580097547,
"cells": [
{
"id": "91d434b5-76f6-44ea-b1f0-a670f1a66549",
"isExternalLink": false,
"columnId": "637bedf7-22df-4d9e-be39-722e28ad9147",
"dateTime": null,
"content": "cell 1,
"tagIds": []
},
{
"id": "4fd2a1e9-b02e-4034-b162-d47681ba0a44",
"isExternalLink": false,
"columnId": "8456b494-fb1c-42b6-a55d-a0d4db5a6c98",
"dateTime": null,
"content": "cell 2",
"tagIds": [
"be98ee4e-0f55-4d07-873d-7573b65fb695"
]
}
]
}
],
"filters": [
{
"id": "118adfb5-2c6b-46be-b370-782fd06d730e",
"columnId": "637bedf7-22df-4d9e-be39-722e28ad9147",
"operator": "or",
"isEnabled": true,
"type": "text",
"condition": "is",
"text": "test"
}
],
"settings": {
"numFrozenColumns": 1,
"showCalculationRow": true
}
},
"pluginVersion": "8.6.0"
}

Typescript declarations

The examples above are not comprehensive. If you would like to full Typescript declarations for the loom file, please visit the GitHub repository.