Live data from Hacker News

New better alterative to XML, JSON and YAML

xenondata.org

31–40 of 148 posts

Re: New better alterative to XML, JSON and YAML

#31
post #3

I feel like I've seen countless attempts at this, and this design doesn't seem any better than usual. There's not much in here to justify the design decisions, nor any indication that a parser implementation exists or is even being actively worked on. For something meant to be "Efficient to write by hand", the insistence on tag-like syntax but with "tags" that consist entirely of a single punctuation character, or wh…

Both a C# and JavaScript implementations exist. The terse “single punctuation character”, e.g. make it efficient to write, more efficient than JSON. There is no “extra open bracket”? There is a overview of how the indenting operates. Mode-less, means the tokeneizer does not require modes, unlike those required for XML. The parser has state. Have the top level document named allows one to see what the document is, e.g…

`` is not simpler than `}`, nor `]`.

The array syntax has the "extra open (angle) brackets": in ` Fredrick Freddy ` we see ``.

Re: New better alterative to XML, JSON and YAML

#33

Its like you took xml and made a drunken bastardized baby with json. This is ugly and id rather read untabbed json than this hot mess

This is needlessly rude and dismissive, consider that the author of this spec is in the comments responding to people. If he had presented this at a conference would you come up to him after and say this to his face? Try to have a little more decorum when giving feedback

> If he had presented this at a conference would you come up to him after and say this to his face?

Is this a fair comparison? I didn't come here by invitation and neither did the author.

> Try to have a little more decorum when giving feedback

It's not feedback. It's an unexpurgated opinion. We are reading a comment card. It has a value of it's own.

Re: New better alterative to XML, JSON and YAML

#34
post #8

> Xenon is the best way to represent information: terse The best would be to remove all the unneeded unergonomic shift-requiring from here, you already have = symbol with whitespace and $ that separate all you need

The example you give is valid xᴇɴᴏɴ. The key and value may contain whitespace and must be delineated? s are that that made XML and HTML good.

So delineate them when they contain whitespace, for example "quotes serve exactly that purpose". There is no point in delineation when there is nothing to delineate, it's just needless verbosity in a language that aims to be "terse"

What exactly is good about s that you think it's the good in the bad XML?

Re: New better alterative to XML, JSON and YAML

#37
Sorry, as who have already designed yet another JSON alternative. Many things about this format are just wrong (as of the first edition):

- (EDIT: Mistakenly read SHOULD as MUST, ignore this item please) The requirement for the mandatory BOM is unacceptable for most non-Windows users, as BOM is by definition invisible.

- An arbitrary name is equally questionable, even XML doesn't do that. Do you accept tabs for example?

- There is absolutely no way to indicate the data type. The document accidentally mixes the wire format and serialization protocol; never a good sign.

- Do you accept 3,000 or 3,,000 or 30,00 or 3,0,0,0 or ,,,3000 or 3000,,, or 3,e,3 or 0.000,3e7 or ,,,?

- How many digits in each group are recommended for the encoder?

- What on earth is "IEEE 64 bit double precision floating point numbers" in the context of textual format?

- Do you require a specific rounding or not in the decimal-to-binary conversion?

- Is `\u{d800}` accepted or not? (JSON famously has this issue.)

- If you have to escape the base64 padding, maybe you should just drop the padding?

- Graph is generally a bad thing to encode at this level, because many applications do not even expect graphs and that can lead to DoS attacks.

- No clear definition of the data model. The document starts with objects, arrays and scalars (untyped? stringy? I dunno), then only reveals that objects can be typed and shared and specific types of scalars should be written in certain ways much later. Define the data model first and describe possible encodings of that model instead.

- Not allowing anything besides from space and tab is okay, but that doesn't speed processing to be exact.

- While technically a matter of choice, it uses a lot of unmatching angle brackets and that's just... ugly.

- In fact, I don't really see why other grouping characters were unused in the first place.

- No canonical representation.

Maybe you should review tons of other alternatives in this space (I recall at least 2--30 of them, probably much more) before your own design.

Re: New better alterative to XML, JSON and YAML

#38

A new better alternative definition of Terse: The act of proclaiming a “new standard” without any user community to speak of.

It has ALL of the advantages of xᴍʟ.

What advantages does XML have over what? Whatever you’re saying, it’s not as self-evident as you think it is. Respectfully, I think this standard needs to be reframed as version 0.0.1

Re: New better alterative to XML, JSON and YAML

#40
Unless I'm missing something, a major downside of this is that scale types are not explicit, and that is very, very, very bad IMO. It will lead to numerous cases of poor interoperability as scalars are interpreted differently.

That is, in JSON, at least I know "true" represents the string "true", and true represents the boolean value true, and "1.25" is a string and 1.25 is a number. If anything, JSON would be greatly improved by having a specified datetime type, and more guaranteed semantics around numbers (e.g. integers vs. decimals vs floats for example).

XML obviously suffers the same issue, and I think it is much worse for not having types (though highlights the difference between structured "documents" vs. object serialization formats).

Post reply on HN