As others have stated, you have loads of options. Just don't invent (i.e. write parsers) such a thing yourself unless you have a really, really good reason to do so (can't think of any). Just evaluate your options:
- Do you need to access this data anywhere outside my application (with another language)
- Do you want users (or yourself) to be able to edit the file using a simple text editor
- Do you need backwards compatibility with older versions of the used language
For example, PHP provides very easy serialize() and unserialize() functions. The format, however, is not as easily readable / editable by humans (XML can also be hard to read, but not as hard as the PHP format. Python's pickle module is even worse.). If you ever need to access data with other languages, this is a bad choice. And think about others - I recently hat to parse PHP serialized data from the Horde project in a python project of mine! JSON is a much better choice because its human-readable (if its "pretty-printed", not in the compacted form!), human-editable and every major language has JSON-support nowadays. However, you will lose backwards compatibility, e.g. with python, JSON requires version 2.6+.