JSON as configuration files: please don’t

JSON as configuration files: please don’t

JSON is intended to be a “lightweight data-interchange format”, and claims that it is “easy for humans to read and write” and “easy for machines to parse and generate”. The JSON standard is fairly strict − this is good, it allows for concise and fast parsers that don’t have to muck about with different formats − but it also means it’s more difficult to write. What I wanted to do is not include some CSS if a certain plugin is loaded, and we can’t do this − we can (probably) work around it in the PHP file, but “working around” things is never good (and remember, we can’t leave a comment in the JSON file to inform people that we’re working around things!)

Source: arp242.net