DEV Community

Discussion on: Parsing Config Files The Right Way

 
dmerejkowsky profile image
Dimitri Merejkowsky • Edited

you're talking about the implementation?

Oh yes. Sorry.

If I mess up the indentation, I still have a good JSON. If I do the same with YAML it's quite different

Right. I see what you mean. Again, nothing new under the sun. You have exactly the same problem in Python.

Trivia: in a big Python project I was working on for quite a long time I only had a few bugs caused by incorrect indentation, but I can see why it's a big deal for lots of people :)

And the solution is the same: keep your code "flat" by using nice little helper functions.