this post was submitted on 13 Nov 2023
107 points (82.4% liked)
Programmer Humor
19551 readers
425 users here now
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Serializing? For serializing you probably want performance above all else. I'm saying this without checking any benchmark, but I'm sure yaml is more expensive to parse than other formats where indentation don't have meaning.
For human readability: it has to be readable (and writeable) by all humans. I know (a lot of people) that dislike yaml, toml and XML. I don't know of a single person that struggles to read/write json, there is a clear winner.
JSON would be perfect if it allowed for comments. But it doesn't and that alone is enough for me to prefer YAML over JSON. Yes, JSON is understandable without any learning curve, but having a learning curve is not always bad. YAML provides a major benefit that is worth the learning curve and doesn't have the issues that XML has (which is that there is no way to understand an XML without also having the XSD for it)
Json should also allow for trailing commas. There's no reason for it not too. It's annoying having to maintain commas.
And also a standard date time type!
What is wrong with ISO 6801 strings?
11-2023-14
I dunno it just kinda looks weird to me
Dunno what format you've got there, but ISO 6801 looks like
2023-11-15T18:28:31Z
It's a joke, because the standard is 8601, not 6801.
Oh. Egg on my face then lmao I didn't even notice