▲ 62 ▼ Why YAML sucks? (programming.dev) submitted 2 years ago* by heikkiket@programming.dev to c/programming@programming.dev 134 comments fedilink hide all child comments I feel that Yaml sucks. I understand the need for such markup language but I think it sucks. Somehow it's clunky to use. Can you explain why?
[–] borup@programming.dev 13 points 2 years ago (5 children) JSON does lack comments. And numbers that are not 64 floats. permalink fedilink source parent hideshow 10 child comments replies: [–] marcos@lemmy.world 7 points 2 years ago (1 child) TFB, the numbers are not defined as 64 bits floats. They are just not defined. At all. permalink fedilink source parent hideshow 2 child comments replies: [–] TCB13@lemmy.world 1 point 2 years ago (1 child) Exactly that's a job for the parser / consumer. permalink fedilink source parent hideshow 2 child comments replies: [–] marcos@lemmy.world 1 point 2 years ago That's a valid point. There are two kinds of good serialization languages, the ones where values are black boxes and only serialize the data structure, and the ones where everything is completely determined and can be turned directly into an API. JSON is neither, but it's closer to the first than YAML. XML is the first, while the SOAP standard almost turns it into the second. TOML is about as close to the first as JSON. permalink fedilink source parent [–] Damage@feddit.it 5 points 2 years ago Readability in general sucks permalink fedilink source parent [–] atzanteol@sh.itjust.works 4 points 2 years ago There's a spec for json with comments. It's better than yaml in every way. permalink fedilink source parent [–] TCB13@lemmy.world 1 point 2 years ago* There's a lot of JSON parsers that don't mind to see comments there, just ignore them. And there's also the "_comment" / "$comment" thing. permalink fedilink source parent [+] NostraDavid@programming.dev 1 point 2 years ago* (last edited 1 week ago) [deleted] permalink fedilink source parent
[–] marcos@lemmy.world 7 points 2 years ago (1 child) TFB, the numbers are not defined as 64 bits floats. They are just not defined. At all. permalink fedilink source parent hideshow 2 child comments replies: [–] TCB13@lemmy.world 1 point 2 years ago (1 child) Exactly that's a job for the parser / consumer. permalink fedilink source parent hideshow 2 child comments replies: [–] marcos@lemmy.world 1 point 2 years ago That's a valid point. There are two kinds of good serialization languages, the ones where values are black boxes and only serialize the data structure, and the ones where everything is completely determined and can be turned directly into an API. JSON is neither, but it's closer to the first than YAML. XML is the first, while the SOAP standard almost turns it into the second. TOML is about as close to the first as JSON. permalink fedilink source parent
[–] TCB13@lemmy.world 1 point 2 years ago (1 child) Exactly that's a job for the parser / consumer. permalink fedilink source parent hideshow 2 child comments replies: [–] marcos@lemmy.world 1 point 2 years ago That's a valid point. There are two kinds of good serialization languages, the ones where values are black boxes and only serialize the data structure, and the ones where everything is completely determined and can be turned directly into an API. JSON is neither, but it's closer to the first than YAML. XML is the first, while the SOAP standard almost turns it into the second. TOML is about as close to the first as JSON. permalink fedilink source parent
[–] marcos@lemmy.world 1 point 2 years ago That's a valid point. There are two kinds of good serialization languages, the ones where values are black boxes and only serialize the data structure, and the ones where everything is completely determined and can be turned directly into an API. JSON is neither, but it's closer to the first than YAML. XML is the first, while the SOAP standard almost turns it into the second. TOML is about as close to the first as JSON. permalink fedilink source parent
[–] Damage@feddit.it 5 points 2 years ago Readability in general sucks permalink fedilink source parent
[–] atzanteol@sh.itjust.works 4 points 2 years ago There's a spec for json with comments. It's better than yaml in every way. permalink fedilink source parent
[–] TCB13@lemmy.world 1 point 2 years ago* There's a lot of JSON parsers that don't mind to see comments there, just ignore them. And there's also the "_comment" / "$comment" thing. permalink fedilink source parent
[+] NostraDavid@programming.dev 1 point 2 years ago* (last edited 1 week ago) [deleted] permalink fedilink source parent