Joomla recently switched from ini files to JSON encoded files. Encoding and decoding json using json_encode()
and json_decode()
performs better than reading and writing ini files.
There is a drawback however: json is not easily human readable. You need to use a php script to encode your config file. You can use this solution well when you want to write your config in an administrator part of your website.