aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: 9941ca64614f713b359e56bc157281e5aab5f576 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
NYAML (NotYAML) - YAML like markup language.
=============

It more clean and (in future :) ) more powerful than YAML.
Author: Alexander "NeonXP" Kiryukhin (frei@neonxp.info)
License: GPLv2

Example of correct NYAML file (test.nyaml):
------

node 1
<pre>
<code>
    #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]"
</code>
</pre>
test.php:
------
<pre>
<code>
<?php
    include("nyaml.php");
    $nyaml = new nyaml();
    print_r($nyaml->file("test.nyaml"));
</code>
</pre>
Result:
------
<pre>
<code>
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]
                )
        )
)
</code>
</pre>