title: Encoding of Sz Metadata
role: manual
tags: #api #manual #reference #zettelstore
syntax: zmk
back: 00001012931000
backward: 00001012931000
box-number: 1
copyright: (c) 2020-present by Detlef Stern <ds@zettelstore.de>
created: 20230403161618
forward: 00001006030000 00001006031000 00001006031500 00001006032000 00001006032500 00001006033000 00001006033500 00001006034000 00001006034500 00001006035000 00001006035500
lang: en
license: EUPL-1.2-or-later
modified: 20250115172406
published: 20250115172406
visibility: public

A single metadata (&ldquo;metadatum&rdquo;) is represented by a triple: a symbol representing the type, a symbol representing the key, and either a string or a list that represent the value.

The symbol depends on the [metadata key type](00001006030000).
The value also depends somehow on the key type: a set of values is represented as a list, all other values are represented by a string, even if it is a number.

The following table maps key types to symbols and to the type of the value representation.

| Key Type | Symbol | Value |
| :-- | :-- | :-- |
| [Credential](00001006031000) | `CREDENTIAL` | string |
| [EString](00001006031500) | `EMPTY-STRING` | string |
| [Identifier](00001006032000) | `ZID` | string |
| [IdentifierSet](00001006032500) | `ZID-SET` | ListValue |
| [Number](00001006033000) | `NUMBER` | string |
| [String](00001006033500) | `STRING` | string |
| [TagSet](00001006034000) | `TAG-SET` | ListValue |
| [Timestamp](00001006034500) | `TIMESTAMP` | string |
| [URL](00001006035000) | `URL` | string |
| [Word](00001006035500) | `WORD` | string |

*ListValue* __=__ `(` String<sub>1</sub> String<sub>2</sub> … String<sub>n</sub> `)`.

Examples:

* The title of this zettel is represented as: `(EMPTY-STRING title "Encoding of Sz Metadata")`
* The tags of this zettel are represented as: `(TAG-SET tags ("#api" "#manual" "#reference" "#zettelstore"))`