Hi Paddy,
Excellent! If PHP and ZF both include support for JSON ... all the more
reason to support a YAML parser (i.e. superset with some nice "extras").
Cheers,
Gavin
[EMAIL PROTECTED] wrote:
-->
YAML is light on the ground in PHP. Outside the Spyc library which is
bundled with Symfony and used for it's own input filtering
configuration, I can't think of another native parser. Syck is pretty
much standard in Ruby (as Gavin noted), and has bindings for Perl,
Python, PHP, etc. Until a standard core extension for YAML appears, a
PHP parser is the only reliable means of adding YAML processing to a
PHP application without recompiling PHP with Syck.
If nothing pops up from Bruce (who suggested a YAML parser for the ZF
per Gavin's email last Summer) in the next few days I'll take a look
at what a parser would require. The YAML spec isn't completely off the
wall complicated esp. since hierarchy is dictated by simple
indentation and the rest should be a simple variable/array type
mapping between YAML and PHP based on the YAML syntax characters. The
only complicated bit would be managing parenting properly since the
format would be processed top to bottom.
I'll see if I have some free time later in the week to look at it in
more detail. If I do I'll submit a proposal so there's something to
read once the 1.0 release is made and if it's feasible I'll commit
some personal time to developing it. I guess if I want it I might as
well add it :).
Paddy
Pádraic Brady
http://blog.astrumfutura.com
http://www.patternsforphp.com