NYAML/README.md

65 lines
1.4 KiB
Markdown
Raw Normal View History

2012-02-12 05:46:28 +04:00
NYAML (NotYAML) - YAML like markup language.
=============
2012-02-12 05:59:33 +04:00
It more clean and (in future :) ) more powerful than YAML.
Author: Alexander "NeonXP" Kiryukhin (frei@neonxp.info)
License: GPLv2
2012-02-12 05:46:28 +04:00
Example of correct NYAML file (test.nyaml):
------
2012-02-12 05:54:40 +04:00
<pre>
2012-02-12 05:52:00 +04:00
<code>
2012-02-12 05:55:43 +04:00
node 1
2012-02-12 05:46:28 +04:00
#this is node 1
value 1
node 2:
key1: value1
key2: "value too"
key3: 'and this!'
node 3:
key1: [elements, [of,array]]
key2: "[this, is, not, array]"
2012-02-12 05:52:00 +04:00
</code>
2012-02-12 05:54:40 +04:00
</pre>
2012-02-12 05:46:28 +04:00
test.php:
------
2012-02-12 05:54:40 +04:00
<pre>
2012-02-12 05:52:00 +04:00
<code>
2012-02-12 05:55:43 +04:00
&lt;?php
2012-02-12 05:46:28 +04:00
include("nyaml.php");
$nyaml = new nyaml();
print_r($nyaml->file("test.nyaml"));
2012-02-12 05:52:00 +04:00
</code>
2012-02-12 05:54:40 +04:00
</pre>
2012-02-12 05:46:28 +04:00
Result:
------
2012-02-12 05:54:40 +04:00
<pre>
2012-02-12 05:52:00 +04:00
<code>
2012-02-12 05:46:28 +04:00
Array
(
[node 1] => Array
(
[0] => value 1
[node 2] => Array
(
[key1] => value1
[key2] => value too
[key3] => and this!
)
[node 3] => Array
(
[key1] => Array
(
[0] => elements
[1] => Array
(
[0] => of
[1] => array
)
)
[key2] => [this, is, not, array]
)
)
)
2012-02-12 05:54:40 +04:00
</code>
</pre>