Alex Rivera | Logout

What's Is the Best File Format for Configuration Files

Asked 2009-01-24T23:42:44.783
15

I am creating a framework in PHP and need to have a few configuration files. Some of these files will unavoidably have a large number of entries.

What format would be the best for these config files?

Here is my quantification of best:

  1. Easily parsed by PHP. It would be nice if I didn't have to write any parsing code but this is not a deal breaker.
  2. Remains easily read by humans even when there are a large amount of entries
  3. Is a widely used standard, no custom formats
  4. Succinctness is appreciated

I started out using XML, but quickly gave up for obvious reasons. I've thought of JSON and YAML but wanted to see what else is out there.

Edit
Report

1 Answer

14

YAML is a good option: http://www.yaml.org/

It's very simple and powerful, too

Ruby projects use it a lot for configuration.

answered 2009-01-24T23:51:42.410

Your Answer