My experience with YAML is that it's very temperamental with respect to /whitespace/ and that your editor might try to get too smart and damage the document.
JSON, if you see a pattern and follow the pattern, is likely to work.
JSON CAN be stored in a 'pretty' way, with extra whitespace, which makes it even more obvious how to format a document; that's frequently how I write out small bootstrap config files (IE the database connection string to get the main config from).
You see, as much as you have strong feelings about whitespace (to the extent of reaching for your caps-lock key), so do I. I personally feel it's a great loss to code style and readability that Python become an outlier in terms of arguing for significant whitespace.
But this isn't the time for that tired old debate. I won't convince you any more than I'll convince someone about the One True Brace Style or Vim vs EMACS (actually - hold on. I can't stand either of them).
Python's mistake is not including a default-coding-style formatting system with the language (or if it does, making it so obscure I don't know about it).
The formatter should ALSO, when cleaning up the code, see if it compiles with four spaces equal to a tab, and then if not, if eight spaces is a tab.
I'd prefer that levels of intent be a tab (not space; if you're going to make presentation of indent important make it something the client CAN modify without changing the meaning of the code).
Can you give an example of where an editor has damaged your documents? I've never had that experience when editing YAML with Vim, Emacs, or TextMate… which editor are you using?
Focusing on the editor won't help because then you're adding an unexpected constraint on the user.
I think I happened to experience it using kwrite, or maybe also notepad++ when I had to edit something from a non-default computer once. The point still remains that editors which /try/ to be smart and helpfully correct, convert, or automatically indent things, won't always do it the way you might have wanted. What works in one context won't work in others, and having context sensitive whitespace handling can bite you when the program isn't aware of which context it's supposed to be crafting the document in (EG when you start a new one or copy an example from the web).
"Unexpected constraint" is a very curious choice of words. In my experience, when you teach novice programmers, braces and semicolons are the unexpected constraints. Line breaks and indentation is a bit more expected to the novice programmer. ("Optional semicolons" like in JavaScript seem to be the worst of both worlds.)
Programmers with experience will expect things to behave like the languages they know. If you are experienced with Python, Haskell, or YAML, they won't seem like surprises.
Funny that Notepad++ and Kwrite have given you problems, those are usually fairly good editors and should be able to write Python / Haskell / YAML just fine. I wonder what happened to cause those problems.
I hate it when languages and formats care about whitespace beyond just whether there is some between two tokens.
Not being able to use tabs in Haskell is annoying for example. And I find having to indent stuff so it is off the page to the right to get stuff to compile unsatisfactory.
Same with YAML. I detest a format where indenting matters. It shouldn't matter.
I get that you hate Haskell, Python, and YAML. Could you explain why you are sharing this hate with everyone here? I mean, what is the point? There are lots of things I hate, but I don't revel in that hatred.
My experience with YAML is that it's very temperamental with respect to /whitespace/ and that your editor might try to get too smart and damage the document.
JSON, if you see a pattern and follow the pattern, is likely to work.
JSON CAN be stored in a 'pretty' way, with extra whitespace, which makes it even more obvious how to format a document; that's frequently how I write out small bootstrap config files (IE the database connection string to get the main config from).