(((meta ((content . "Data Encoding") (name . "title"))) (meta ((content . "manual") (name . "role"))) (meta ((content . "#api #manual #reference #zettelstore") (name . "tags"))) (meta ((content . "zmk") (name . "syntax"))) (meta ((content . "00001012920500") (name . "back"))) (meta ((content . "00001012920500") (name . "backward"))) (meta ((content . "1") (name . "box-number"))) (meta ((content . "(c) 2020-present by Detlef Stern ") (name . "copyright"))) (meta ((content . "20260303142542") (name . "created"))) (meta ((content . "00001012920516 00001012921200 00001012930000") (name . "forward"))) (meta ((content . "en") (name . "lang"))) (meta ((content . "EUPL-1.2-or-later") (name . "license"))) (meta ((content . "20260303163611") (name . "modified"))) (meta ((content . "20260303163611") (name . "published"))) (meta ((content . "public") (name . "visibility")))) (p "The data encoding represents the zettel as a special " (a ((href . "00001012930000")) "symbolic expression") "." " " "In contrast to the similar-looking " (a ((href . "00001012920516")) "sz encoding") ", a much simpler structure is used.") (p "If transferred via HTTP, the content type will be " (kbd "text/plain; charset=utf-8") ".") (p "A full zettel, both metadata and content, is encoded by the list") (div ((class . "syntax")) (p (kbd "(zettel") " " (a ((href . "#metadata")) (em "Metadata")) " " (a ((href . "#access-rights")) (em "Access rights")) " " (a ((href . "#content-encoding")) (em "Content encoding")) " " (a ((href . "#content")) (em "Content")) " " (kbd ")") ".")) (p "If you only want to encode the metadata of a zettel, the following format will be used:") (div ((class . "syntax")) (p (kbd "(list") " " (a ((href . "#metadata")) (em "Metadata")) " " (a ((href . "#access-rights")) (em "Access rights")) " " (kbd ")") ".")) (h2 ((id . "metadata")) "Metadata") (p "Metadata is basically a sequence of key / value pairs:") (div ((class . "syntax")) (p (em "Metadata") " " (strong "=") " " (kbd "(meta") " " (kbd "(") " " (em "Key") " " (em "Value") " " (kbd ")") " … " (kbd ")") ".") (p (em "Key") " " (strong "=") " Symbol.") (p (em "Value") " " (strong "=") " String.")) (p "Each " (em "Key") " is a symbol, derivied from the metadata key." " " "The " (em "Value") " is a string containing the value of the corresponding metadata entry.") (h2 ((id . "access-rights")) "Access rights") (p "This element encodes " (a ((href . "00001012921200")) "access rights") " of a zettel:") (div ((class . "syntax")) (p (em "Access rights") " " (strong "=") " " (kbd "(rights") " Number " (kbd ")") ".")) (h2 ((id . "content-encoding")) "Content encoding") (p "The content encoding specifies, how the zettel content is encoded." " " "Currently, two values are supported: the empty string and the string " (kbd "\"base64\"") ".") (div ((class . "syntax")) (p (em "Content encoding") " " (strong "=") " " (kbd "(encoding \"\")") " " (strong "|") " " (kbd "(encoding \"base64\")") ".")) (p "The empty string indicates that the content is not encoded and can be used as is." " " (kbd "\"base64\"") " indicates that the content string is Base64-encoded (typically used for binary content).") (h2 ((id . "content")) "Content") (p "The content of a zettel is always encoded as a readable string." " " "For binary content, it is first encoded using Base64.") (div ((class . "syntax")) (p (em "Content") " " (strong "=") " " (kbd "(content") " String " (kbd ")") ".")))