4 ms·
As a human, I'd rather write YAML than JSON. But if I'm writing code, I'd rather write code that parses JSON. The problem is that the two often conflict with
by TechBro8615 4y ago
As a human, I'd rather write YAML than JSON. But if I'm writing code, I'd rather write code that parses JSON.
The problem is that the two often conflict with each other, because I'm writing code to parse config written by a human.
My rule of thumb is that any autogenerated communication between services can be done over JSON (assuming some more efficient serialization format isn't available), but if a human needs to maintain it (and check it into a repo with diffs) then it should be YAML.
- brodouevencode 4y agoI agree with this point. I would also say that while HCL gets a lot of hate from the developers it really is an easy language to learn and use. Yes it's another language but the language itself I found to be very natural for declaring desired state. Last year I spent two half-days training my team on it (I have a lot of experience with it) and they picked it up rather well. Previous teams I worked with had similar results. It may not be their favorite language, but it's not as bad as cloudformation or a heavy, cumbersome CDK.