JDAML: Jevko Data And Markup Language

#data #config #markup

JDAML logo

JDAML (Jevko Data And Markup Language, pronounced /dʒeɪˈdæməl/) is an XML-like format built on Jevko designed to work equally well for data interchange, configuration, and text markup.

test tube emoji

JDAML is still experimental. The idea is that it should be a flexible complement or an alternative to formats and syntaxes such as HTML, XML, JSX, JSON, YAML, TOML, etc.

It can serve as a unified, lean, and human-friendly representation of these formats, can be mixed with them, or can be used alone.

Mapping to other formats

Below are a few examples of mapping JDAML to and from formats in various domains.

Data interchange1

see the example live

JDAML:JSON

JSON:JDAML

see the example live

JDAML:XML

XML:JDAML

Configuration2

see the example live

JDAML:JSON

JSON:JDAML

Text markup3

see the example live

JDAML:HTML

HTML:JDAML

Features

Same basic primitives as XML/HTML

JDAML uses the same basic primitives as XML or HTML:

  1. Text nodes.
  2. Elements.
  3. Attributes.

Attributes are more flexible

Like in XML/HTML, attributes in JDAML are semantically unique and unordered.

However, they are much more flexible than in XML/HTML:

This gives JDAML the ability to represent unordered sets of name-value pairs distinctly from ordered collections of values. So for example we can have a clear mapping between JDAML and JSON objects and arrays.

This design makes the format truly extensible. Changing a value of an attribute from simple text to a complex structure is not only possible (unlike in HTML/XML), but natural and easy.

Also, changing an attribute into an element and vice versa is extremely easy (unlike in HTML/XML).

Whitespace is always preserved

JDAML always preserves whitespace in the syntax tree without any change.

Status of JDAML

test tube emoji

Currently JDAML is experimental and only has a Proof of Concept implementation to test. Source code is available at Codeberg.

Feedback welcome!