MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1y1sn81/complexitywithsuperiorformats/19sz3xo7y3gjl/
r/ProgrammerHumor • u/darthbbane • 11d ago • 1
129 comments sorted by
View all comments
Show parent comment
-2
I can't imagine a single typo outside of strings themselves (which json would also accept) that wouldn't break yaml
I'm thinking hard and I can't imagine a single one, do you have one in mind?
Missing a colon, wrong char in the keys, whitespace,... all I can think of would break loud, just like in json.
Maybe stuff like 80 -> 80e20? But that would go unnoticed in json as well...
EDIT: or do you not validate your input? But then json won't help either, aside from the whitespace part
2 u/wd40bomber7 11d ago So so many. Removing some whitespace, dropping the - character... Just look up "yaml Norway problem" for a whole class of bugs json doesn't have... 1 u/CWRau 11d ago But why not specify a schema? That way you even have completion, as well as catching such errors? 2 u/wd40bomber7 10d ago I've had to use YML for configuration of a *lot* of things and I've never seen anyone with strict enforcement like you're describing.
2
So so many. Removing some whitespace, dropping the - character... Just look up "yaml Norway problem" for a whole class of bugs json doesn't have...
1 u/CWRau 11d ago But why not specify a schema? That way you even have completion, as well as catching such errors? 2 u/wd40bomber7 10d ago I've had to use YML for configuration of a *lot* of things and I've never seen anyone with strict enforcement like you're describing.
1
But why not specify a schema? That way you even have completion, as well as catching such errors?
2 u/wd40bomber7 10d ago I've had to use YML for configuration of a *lot* of things and I've never seen anyone with strict enforcement like you're describing.
I've had to use YML for configuration of a *lot* of things and I've never seen anyone with strict enforcement like you're describing.
View all comments
Show parent comment
-2
u/CWRau 11d ago
I can't imagine a single typo outside of strings themselves (which json would also accept) that wouldn't break yaml
I'm thinking hard and I can't imagine a single one, do you have one in mind?
Missing a colon, wrong char in the keys, whitespace,... all I can think of would break loud, just like in json.
Maybe stuff like 80 -> 80e20? But that would go unnoticed in json as well...
EDIT: or do you not validate your input? But then json won't help either, aside from the whitespace part