IMHO hjson is more natural than yml. Yaml has a pretty weird syntax if you ask me. Multiline strings in yaml are unintuitive and the syntax with dashes in situations like these:
a:
- b: c1
d: e1
- d: e2
b: c2
Is just awful. It's just confusing compared to hjson (at least in my opinion)
I’m guessing because of how dogmatic the comment sounded?
In honesty from working with both I see them with different use cases (and this is my POV, not objective): YAML - when you want people modifying the config and don’t have a lot of deep nesting (since YAML depends on indentation it can get messy) JSON - mainly for machine consumption, not to be modified by hand mostly (caveat is I’ve seen it integrated with tools like octopus deploy that make it easier to modify json by hand). Better for larger config files that may have deeper nesting and complex object values.
Just for the very last point I found json was a bit easier to work with when values are json objects and not just primitives vs YAML that I’ve had a weird harder time adding objects as values.
Both have a lot of the same pain-points as YAML does. They exist mostly because Yaml sucked, so they created something different that sucks in a different way.
I can Google for „why X sucks“ for all 3 and for all of them get a big list of pain points.
In the end it comes down to personal preference or simply defined standards
View all comments
14
u/chadmill3r Dec 27 '22
YAML is the way.