yosymfony/Toml — pull request #6 by ezzatron (2014-09-11 09:38:14+00:00)
Title: Implemented object parser.

I'm in the process of writing a library inspired by the JSON schema spec that is serialization-agnostic (i.e. works with JSON, YAML, or TOML). It would be extremely handy to have the option to produce `stdClass` objects similar to `json_decode`, as it removes the ambiguity between an empty array and an empty object. Generic objects can also be really nice for working with this kind of data.

In this PR, I simply copy-pasted your existing parser and tweaked it, until it produced objects instead of associative arrays. This way there's no performance sacrifice, as there would be if the original parser was modified to conditionally change its output. I also copied the test suite, and modified where necessary to suit the new parser.

I'm sure that the two parsers could also be refactored into a common base class, but I don't have the time to tackle that at the moment.

Cheers :)