The alternative to .yaml, with smaller file sizes and the simplest syntax. Blazing fast parsing, read and write speeds, see benchmarks.
- One value per key, no lists. You can however split the value by a certain char like a space and return a list of values. This is up to you.
- Values cannot contain line breaks
All sections must have a parent section, except the root/first section. A child section gets defined by adding 2 spaces at the beginning:
parent
child
Keys must be unique in each section:
parent
child1
child2
All sections can have values. Values get defined by adding a space after the key (thus a key cannot contain spaces):
parent value
child1 value
child2 value
Comments must be above a section, and get defined by having one more leading space than the section they belong:
I am a comment of parent
parent
I am a comment of child
child
Empty values do not exist. Only null values exist. Which means that if the value is empty or only contains spaces return null:
Returned value is null
key
Returned value is "null"
key null
Returned value is "''"
key ''
example.dyml
First comment
key1 value
child1 value
child2 value
Second comment
key2 value
- Maybe use tab instead of 2 spaces to reduce file size?
Create complex objects / a list of objects, with two line breaks:
This is one object
key value
key2 value
This is another object
key value
key2 value
Comlex objects also as children of a parent:
parent value
child value
child2 value
child value
child2 value