Now on top of that you can build a format that specifies what happens to whitespace, etc. Usually you'd want it trimmed if the prefixes mean keys in a map.
The simplest format/library that does just that is this:
Without any whitespace rules I wouldn't really call this human-readable format. The canonical serialization of a tree is without any whitespace and unlike json/xml/sexpr you can not reformat the document for human readability because any added whitespace changes the content.
Plain Jevko is a notch below JSON/XML/S-expr -- it's not really a format, but a syntax that can be leveraged to build a format.
This is where the rules for whitespace would be specified. These can then be taken advantage of by tools to reformat, etc.
The simplest format that I came up with and should specify next that will most likely do what you want is Easy Jevko. For details see this rabbit hole: https://news.ycombinator.com/item?id=33337098
For an alternative minimal syntax which is based around whitespace check out:
If the Jevko spec does not handle white space and leaves it to clients, then it will cause issues for data interchange. In order for 2 different clients to read the same Jevko file, they will need to align on how they handle white space.
For the dubious benefit of defining only three special characters (opening delimiter, closing delimiter and escaping prefix) without the usual commitment of defining a whitespace character class (like in most mainstream languages) and/or more delimiters and punctuation.
Jevko seems "simpler" than traditional syntaxes in the same way that a heap of bricks is simpler than a wall.
Jevko leaves whitespace handling not to clients, but to formats built on Jevko which would be the thing the clients typically use (rather than plain Jevko). Such formats of course should be clearly specified, which is something I hope to get around to soon.
I already have a good candidate format for specifying first, which has 2 implementations:
Indeed, in most of the formats I built on Jevko this is how it works.
To use the nomenclature from the spec, if there are no subjevkos (subtrees) in a jevko (tree), then it is interpreted as a string (which is made from its suffix).
Taking the example from github page (abbreviated):
why isn't it equivalent to this json? somehow the whitespace is instead implicitly magiced away, but that isn't defined in the grammar anywhere as far as I can see?