9

I never liked YAML. But lately, I'm starting to dislike it more and more.

I mean, wtf is that?
- digest YAML input -- a valid YAML
- digest JSON input -- a valid YAML

A language that embeds another language.

Can it be any more confusing..?

Sure it can. the
```
script:
- echo "John said: hello there"
```

will fail YAML linter, because, even though I used quotes, yaml sees `echo "John said` as an object key

I think I'm yet to find more nonsense with YAML. And eventually, I'll grow to hate it.

Comments
  • 3
    The whole superset of json thing irritates me, too. That statement just doesn't make any sense to me.

    BUT, the only thing you're stressing about is the fucking quotes?
    How about wrapping the complete list item into them. "echo 'something: something'"? As you actually should?
    If this doesn't work, either, I'm totally on your side.
  • 1
    @nitwhiz It works.

    And no, it's not the only thing that annoys me. I'm finding new peeves every day now
  • 3
    Yaml is a horrible format and people need to stop using it

    If you want a config file, use toml
    If you want a text based data format to (de)serialize to/from: use json

    Same with XML that shit needs to die as well
  • 1
    I thought yaml was our saviour. Maybe it's good only for very simple stuff and anything complicated should be left for other means.
  • 0
    @LotsOfCaffeine XML is ok (not great but any means) as long as it is not intended for humans to edit. Too many things have used XML as a human editable config/data file.
  • 0
    @BobbyTables XML sucks in any possible way imo. Parsing it is a fucking chore, for both, humans and computers.

    Json is the sweet spot, not too many rules, not too lax, no edgecases. Yaml tried to be more human friendly but it failed successfully, just because you adopted it when your config was simple and you need to keep it now, as the complex wonkydonky scenarios hit you, see this rant.^^
  • 2
    There is also JSON5 which tries to be a bit less verbose without being so lax as to create weird behavior.

    YAML really is shit though. I write my CI config in JSON, and have a script to convert to .gitlab-ci.yml (and do a bit of proprietary variable replacement etc.)

    And im much happier now😅
  • 1
    @eval I don't think the world needs that, honestly

    Json is just a data format, its great for sterilization but for config files, or rather, files humans have to edit regularly, I'd much more prefer toml
Add Comment