Hacker News new | past | comments | ask | show | jobs | submit login

YAML sounds like the, olde time "hardy hard har" solution to modern extensible languages. Where pretty much "anything goes" to the point of conceiving full blown tumor executables.

People can say what they want about JSON but anything beats the old world of rolling your own serializers and convincing your boss over the hours you've spent reinterpreting some "sporadic flavor" like YAML.




I love JSON, but it sure would be nice to hop into a time machine and force Douglas Crockford at gunpoint to add comments to the spec.


> force Douglas Crockford at gunpoint to add comments to the spec.

You mean re-add them.

> I removed comments from JSON because I saw people were using them to hold parsing directives, a practice which would have destroyed interoperability.


Well the good news is that I found a better use for the gun I brought back to the past to threaten Douglas Crockford.


Should serialized data allow comments though? I feel that's considered Metadata that could be connoatated elsewhere.


> Should serialized data allow comments though?

Hum... Why not? Serialized data can be written and read by humans too.

Besides, if comments are out of scope, there is no reason for them to be textual either.


Ideally no, but with JSON being used as a configuration file format and being written by humans, I don't think we have much of a choice.


Many JSON parsers has flags to enable comment parsing (and someone went ahead and made a "standard" called JWCC that seems to be more or less what these parsers accept)

I think that is a good tradeoff, JSON being strict for data interop with the possibility of enabling comments for those cases where people use it for configuration (and specifying it as JWCC)




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: