12

See that dip in JSON in 2018? It's countered by a slight rise in YAML. According to this article, it's because of all CI and Docker services. Can't think of many reasons to use YAML above e.g. JSON.

https://theregister.co.uk/AMP/2018/...

Comments
  • 4
    Other then Ci/CD most devs wouldn’t have a use for YAMl, also with the MS taker over of Github, a lot of projects ended up in GitLab where Ci/CD is free and shoved in your face on repo creation.
  • 4
    YAML has more nicer and human-readable syntax.
  • 0
    @mishaor And is indentation crazy "remove that fucking tab!"
  • 1
    @C0D4 Worth moving to gitlab?
  • 4
    @ScriptCoded I use it for all my personal projects, where as “the company” pays for github for work repos.

    It’s basically the same as github + free private repos, free Ci/CD hours per month and if you don’t want cloud based repo storage, they do have a self hosted version as well.
  • 1
    @C0D4 That's actually pretty neat :)
  • 1
    @irene Really? How comes?
  • 2
    The rise in interest in yaml is not proportional to the decrease of interest in json. I doubt yaml is the reason here
  • 3
    Json and Yaml have very different use cases. Json is really nice for encoding data in text, but it sucks for humans to read, you can't even use comments. Yaml is one of several languages that fill that human friendly configuration language gap.
  • 3
    You can comment in yaml. Thats sometimes useful. Also its better readable. Indentation isnt an issue if you code in an ide/editor with suppor5 for it.
    Well in the end I use json anyway but I actually like yaml more.
  • 1
    @Npstr @musician Yeah, comments are nice. You'd have to use JSONC for that. But let's say your colleague prefers working with tabs, and you with spaces. Most likely you will have some sort of guidelines for that, if not event restrictions, but there are cases when a tab slips in somewhere. That gets crazy annoying when you're halfway through CI/CD pipeline.
  • 2
    @ScriptCoded I see what you mean but thats one of the reasons you need to use a precommit hook which autoformats the code to the companies standard imo
  • 1
    @ScriptCoded Use a proper formatter. If your IDE does not support formatters, use a proper IDE. Also a team not using a common formatter sounds horrific.
  • 1
    @Npstr Welcome to the real world
  • 0
    @musician Hmm, perhaps. Just not too fond of it...
  • 2
    I find JSON to be very readable. JSON5 is even better tho
  • 1
    all valid Json is valid yaml. also yaml has comments. so that right there means it's json+comments+a bunch of other mazing stuff.

    let's talk about that other stuff:
    - more readable
    - better formatting
    - hey look this intuitive bulleted list style is valid yaml
    - wow that make so much sense!
    - more popular than any other json superset out there.

    my point: if you aren't using JavaScript, and therefore need a library to use JSON, opt for a YAML library instead. your files will still work and your sysadmins/technical power users will thank you.
  • 1
    @deadPix3l Oh really? What about indentation?
  • 1
    @ScriptCoded I have never once experienced an indentation error, nor does any standard or specifications I can find require any specific way.

    I don't think yaml even requires indentation at all but I could be wrong. also are you mixing tabs and spaces like a monster? can you please provide us a YAML file that fails to parse because of indentation? I'm legitimately curious now.
  • 1
    @deadPix3l Yes, YAML is indentation sensitive. It uses whatever indentation the file uses
Add Comment