ZJSON Encoding

00001012920503 · Info · (manual) · #api #manual #reference #zettelstore

A zettel representation that allows to process the syntactic structure of a zettel. It is a JSON-based encoding format, but different to the structures returned by endpoint /j/{ID}.

For an example, take a look at the JSON encoding of this page, which is available via the Info sub-page of this zettel:

If transferred via HTTP, the content type will be application/json.

A full zettel encoding results in a JSON object with two keys: "meta" and "content". Both values are the same as if you have requested just the appropriate part.

Encoding of metadata

Metadata encoding results in a JSON object, where each metadata key is mapped to the same JSON object name. The associated value is itself a JSON object with two names. The first name "" references the metadata key type. Depending on the key type, the other name denotes the value of the metadata element. The meaning of these names is well defined, as well as the mapping of key types to used object names.

Encoding of zettel content

The content encoding results in a JSON array of objects, where each objects represents a Zettelmarkup element.

Every Zettelmarkup element is encoded as a JSON object. These objects always contain the empty name "" with a string value describing the type of Zettelmarkup element. Depending on the type, other one letter names denotes the details of the element. The meaning of these names is well defined.