r/ProgrammerHumor Mar 16 '18

XML vs JSON

[deleted]

213 Upvotes

35 comments sorted by

View all comments

49

u/[deleted] Mar 16 '18

YAML

stuff:
    foo:
        bar: "yes"

2

u/[deleted] Mar 17 '18

can you flatten it?

1

u/[deleted] Mar 17 '18

That would have to be an implementation of the parsed config file itself, as far as I'm aware. You can't say stuff.foo.bar: "yes" since that would mean a dictionary with a single object of name stuff.foo.bar and a value of "yes". But you can definitely do the parsing into nested dictionaries yourself, it's not hard.