Skip to content

Termboard JSON Format

The Termboard JSON format is an open and transparent structure that allows for full interoperability with other applications and AI models. It captures not only the semantics (Terms and Relations) but also the complete visual layout, styling, and metadata of a project.

TIP

This guide is intended for developers or AI models looking to programmatically generate or parse Termboard project files.

High-Level Structure

A Termboard JSON file consists of two primary objects: metadata and data. While the application can parse files where terms and relations are at the root, the standard project format uses the following structure:

json
{
  "metadata": { ... },
  "data": {
    "terms": [ ... ],
    "relations": [ ... ]
  }
}

NOTE

Termboard also supports a metaInfo key as an alias for metadata for backward compatibility.


Metadata

The metadata (or metaInfo) object defines the project's identity, document-level settings, and visual schema.

PropertyTypeDescription
idstringUnique identifier for the project.
namestringDisplay name of the project.
authorstringName of the creator.
descriptionstringBrief overview of the project content.
updateDateTimestringISO 8601 timestamp of the last update.
xFieldsarrayDefinitions of Extra Fields (see below).
xFieldsSettingsobjectMaps XFields to visual properties (see below).
documentSettingsobjectGlobal toggles and styling preferences.
termMappingobjectConfigures how fields are handled during Excel export/import.
relationMappingobjectConfigures how relations are handled during Excel export/import.
relationTypeMappingarrayCustom mappings between Relation Names and semantic types.

Extra Fields (xFields)

These define custom attributes that can be applied to Terms or Relations.

json
{
  "id": "field-unique-guid",
  "name": "Branch",
  "type": "hierarchy-branch", // text, dropdown, multi-value, link, hierarchy-level, hierarchy-branch, etc.
  "scope": "both", // 'terms', 'relations', or 'both'
  "values": ["Governance", "Location"],
  "colors": { "Governance": "#FDD835" },
  "hierarchyConfig": {
    "relationType": "Generalization",
    "direction": "ST",
    "splitLevel": 1
  }
}

XField Visual Settings (xFieldsSettings)

This object tells Termboard which XField should control which visual property.

KeyDescription
labelFieldWhich XField to show alongside the Term name.
backgroundColorFieldXField ID controlling the Term background color.
borderColorFieldXField ID controlling the Term border color.
shapeFieldXField ID controlling the Term shape.
sizeFieldXField ID controlling the Term width/height.
lineColorFieldXField ID controlling the Relation line color.

Data

The data object contains the actual elements of the diagram.

Terms (Nodes)

Terms represent entities or concepts.

PropertyAliasTypeDescription
id-stringA unique ID (GUID recommended).
name-stringThe text displayed on the node.
type-stringterm, concept, property, or group.
description-stringDetailed description.
additionalInformationadditional_infostringExtra technical notes (supports Quill.js HTML).
parent-stringThe id of the parent group node.
x, yxpos, yposnumberAbsolute coordinate in diagram space.
synonyms-arrayList of string aliases for the term.
style_*-anyFlattened style (e.g., style_backgroundColor).
xFields_*-anyFlattened XField value (e.g., xFields_Branch).

IMPORTANT

Standard style properties include: style_backgroundColor, style_borderColor, style_fontColor, style_fontSize, style_fontType, style_shape, style_lineStyle, style_width, style_height.

Relations (Edges)

Relations represent the connections between Terms.

PropertyAliasTypeDescription
id-stringUnique ID for the relation.
sourcesourceId, sourceTermstringThe id of the source Term.
targettargetId, targetTermstringThe id of the target Term.
namerelation, relationNamestringLabel of the relation.
relationType-stringSemantic category (e.g., Generalization, Composition).
cardinality-stringTarget cardinality (e.g., 1, *).
cardinalitySource-stringSource cardinality.
additionalInformationadditional_infostringExtra notes (supports Quill.js HTML).
style_*-anyFlattened style (e.g., style_lineColor).

Technical Considerations

1. Unique Identifiers

While Termboard can resolve human-readable names to IDs during import, a full project JSON should use unique, immutable IDs (GUIDs) for all references.

2. Flattening Convention

Termboard uses a flattened naming convention within the data arrays to simplify specific processing steps.

  • Styles: Prefixed with style_ (e.g., style_backgroundColor).
  • Extra Fields: Prefixed with xFields_ followed by the name (not ID) of the field (e.g., xFields_Branch).

3. Coordinate System

If x and y are omitted, Termboard will apply an automatic layout upon loading. A value of 0.90909 for both x and y indicates the node has no fixed position.

4. Semantic Resolution

Termboard automatically attempts to categorize relations based on their name if no relationType is provided. Explicitly providing relationType (e.g., Generalization) ensures correct hierarchical rendering and semantic checks.


Full Example

json
{
  "metadata": {
    "name": "Knowledge Model",
    "id": "model-001",
    "xFields": [
      {
        "id": "xf-1",
        "name": "Category",
        "type": "dropdown",
        "scope": "terms",
        "values": ["Technical", "Business"],
        "colors": { "Technical": "#1E88E5", "Business": "#43A047" }
      }
    ],
    "xFieldsSettings": {
      "backgroundColorField": "xf-1"
    }
  },
  "data": {
    "terms": [
      {
        "id": "node-1",
        "name": "Neural Network",
        "type": "concept",
        "x": 100,
        "y": 100,
        "style_backgroundColor": "#1E88E5",
        "xFields_Category": "Technical"
      }
    ],
    "relations": [
      {
        "id": "rel-1",
        "source": "node-1",
        "target": "node-2",
        "name": "is a",
        "relationType": "Generalization"
      }
    ]
  }
}