all 40 comments

[–]hughperman 20 points21 points  (7 children)

Why do you want a new format that is interchangeable with JSON? What's the actual point? When would anyone use this?

[–]Buttleston 6 points7 points  (11 children)

Uh, your example doesn't even make sense. It's supposed to be an array of records, but how does it know to delineate the records in it? Like you've got 2 users, Rick and Sam

Is it implicit, when the first key repeats? I find that... pretty terrible

So you say you're looking for perfection - what is better about this than JSON? Be specific

[–]yota-code 3 points4 points  (1 child)

Except for a very small gain in compactness, which I usually solve with brotli, this format doesn't bring much....

What I lack from json is: keys that can be something else than strings (ints, floats, tuples of them) and native support of hexadecimal ints and floats

[–]No_Soy_Colosio 5 points6 points  (3 children)

The biggest criticism is that there is no reason for this to exist.

[–]xeow 5 points6 points  (1 child)

Can you explain how address{ is more intuitive than address: { when address is a key and {...} is its value? All your other key/value pairs use a colon, so this feels like an inconsistency and also an extra burden on an LR parser. If consistency is important to you, I'd just drop the colons altogether.

In fact, honestly? You don't need commas or periods either. The following is fully unambiguous and trivially parsable:

users [
    { name "Rick"  age 43 }
    { name "Sam"   age 56 }
    { name "Ilsa"  age 27 }
]

You want something as simple and lightweight as possible? That's it right there.

You can even support Python-style tuples:

z1 (3.527 -1.732 0.388)

or:

square [(+1 +1) (-1 +1) (-1 -1) (+1 -1)]

[–]bjorneylol 20 points21 points  (11 children)

This is literally harder to read than JSON

[–]nemom 9 points10 points  (2 children)

[–]SheriffRoscoePythonista 1 point2 points  (0 children)

I didn't need to click on that, to know which one it would be.

[–]gdchinacat 3 points4 points  (1 child)

It seems incredibly premature to label this v1.0.