Jevko

minimal syntax

Jevko1 is a minimal syntax for encoding tree-structured information.

Its foundation is a beautifully simple abstract grammar, expressed in ABNF[W] as follows:

Jevko = *(open Jevko close / data)

Defining open, close, and data on top of a particular set of symbols instantiates a Jevko variant.

The standard variant is defined on top of Unicode[W]:

Jevko   = *(open Jevko close / data)
open    = "["
close   = "]"
data    = 1*(escape / character)
escape  = "`" ("[" / "]" / "`")

where character is any Unicode character corresponding to a code point[W] excluding the 3 special symbols:

  1. [ – left square bracket, code point 91.
  2. ] – right square bracket, code point 93.
  3. ` – grave accent, code point 96.

Refinements are then layered over Jevko trees to model domain-specific languages[W].

For example, Data Jevko is a generic data language – a simple alternative to JSON or XML2:

<person 
  first-name="John" 
  last-name="Smith"
  is-alive="true"
  age="27"
>
  <address 
    street-address="21 2nd Street" 
    city="New York" 
    state="NY" 
    postal-code="10021-3100" 
  />
  <phone-numbers>
    <phone-number
      type="home"
      number="212 555-1234"
    />
    <phone-number
      type="office"
      number="646 555-4567"
    />
  </phone-numbers>
  <children />
  <spouse xsi:nil="true" />
</person>
{ 
  "first name": "John",
  "last name": "Smith",
  "is alive": true,
  "age": 27,
  "address": {
    "street address": "21 2nd Street",
    "city": "New York",
    "state": "NY",
    "postal code": "10021-3100"
  },
  "phone numbers": [
    {
      "type": "home",
      "number": "212 555-1234"
    },
    {
      "type": "office",
      "number": "646 555-4567"
    }
  ],
  "children": [],
  "spouse": null 
}
deleted: 26 % (107/412), 4.5 characters per line
changed: 8 % (34/412), 1.4 characters per line
first name [John]
last name [Smith]
is alive [true]
age [27]
address [
  street address [21 2nd Street]
  city [New York]
  state [NY]
  postal code [10021-3100]
]
phone numbers [
  [
    type [home]
    number [212 555-1234]
  ]
  [
    type [office]
    number [646 555-4567]
  ]
]
children []
spouse []
Hover or tap on the JSON representation to highlight characters that would have to be deleted or changed to arrive at the Data Jevko version.

The same comparison without syntax highlighting:

<person 
  first-name="John" 
  last-name="Smith"
  is-alive="true"
  age="27"
>
  <address 
    street-address="21 2nd Street" 
    city="New York" 
    state="NY" 
    postal-code="10021-3100" 
  />
  <phone-numbers>
    <phone-number
      type="home"
      number="212 555-1234"
    />
    <phone-number
      type="office"
      number="646 555-4567"
    />
  </phone-numbers>
  <children />
  <spouse xsi:nil="true" />
</person>
{ 
  "first name": "John",
  "last name": "Smith",
  "is alive": true,
  "age": 27,
  "address": {
    "street address": "21 2nd Street",
    "city": "New York",
    "state": "NY",
    "postal code": "10021-3100"
  },
  "phone numbers": [
    {
      "type": "home",
      "number": "212 555-1234"
    },
    {
      "type": "office",
      "number": "646 555-4567"
    }
  ],
  "children": [],
  "spouse": null 
}
first name [John]
last name [Smith]
is alive [true]
age [27]
address [
  street address [21 2nd Street]
  city [New York]
  state [NY]
  postal code [10021-3100]
]
phone numbers [
  [
    type [home]
    number [212 555-1234]
  ]
  [
    type [office]
    number [646 555-4567]
  ]
]
children []
spouse []

In Data Jevko, trees are restricted to 3 basic types:

Any other shape is invalid Data Jevko.


Jevko is a part of TAO, a project to cultivate simplicity in software.


  1. The name Jevko is derived from Polish drzewko, meaning small tree.↩︎

  2. Example piece of data from Wikipedia↩︎