source: branches/testa-single-bookmark/php/spyc-0.5/spyc.yaml @ 68

Last change on this file since 68 was 23, checked in by anonymous, 6 years ago

init

  • Property svn:executable set to *
File size: 3.5 KB
Line 
1#
2#    S P Y C
3#      a simple php yaml class
4#
5# authors: [vlad andersen (vlad.andersen@gmail.com), chris wanstrath (chris@ozmm.org)]
6# websites: [http://www.yaml.org, http://spyc.sourceforge.net/]
7# license: [MIT License, http://www.opensource.org/licenses/mit-license.php]
8# copyright: (c) 2005-2006 Chris Wanstrath, 2006-2011 Vlad Andersen
9#
10# spyc.yml - A file containing the YAML that Spyc understands.
11
12---
13
14# Mappings - with proper types
15String: Anyone's name, really.
16Int: 13
17True: true
18False: false
19Zero: 0
20Null: NULL
21NotNull: 'null'
22NotTrue: 'y'
23NotBoolTrue: 'true'
24NotInt: '5'
25Float: 5.34
26Negative: -90
27SmallFloat: 0.7
28NewLine: \n
29
30# A sequence
31- PHP Class
32- Basic YAML Loader
33- Very Basic YAML Dumper
34
35# A sequence of a sequence
36-
37  - YAML is so easy to learn.
38  - Your config files will never be the same.
39
40# Sequence of mappings
41-
42  cpu: 1.5ghz
43  ram: 1 gig
44  os : os x 10.4.1
45
46# Mapped sequence
47domains:
48  - yaml.org
49  - php.net
50
51# A sequence like this.
52- program: Adium
53  platform: OS X
54  type: Chat Client
55
56# A folded block as a mapped value
57no time: >
58  There isn't any time
59  for your tricks!
60
61  Do you understand?
62
63# A literal block as a mapped value
64some time: |
65  There is nothing but time
66  for your tricks.
67
68# Crazy combinations
69databases:
70  - name: spartan
71    notes:
72      - Needs to be backed up
73      - Needs to be normalized
74    type: mysql
75
76# You can be a bit tricky
77"if: you'd": like
78
79# Inline sequences
80- [One, Two, Three, Four]
81
82# Nested Inline Sequences
83- [One, [Two, And, Three], Four, Five]
84
85# Nested Nested Inline Sequences
86- [This, [Is, Getting, [Ridiculous, Guys]], Seriously, [Show, Mercy]]
87
88# Inline mappings
89- {name: chris, age: young, brand: lucky strike}
90
91# Nested inline mappings
92- {name: mark, age: older than chris, brand: [marlboro, lucky strike]}
93
94# References -- they're shaky, but functional
95dynamic languages: &DLANGS
96  - Perl
97  - Python
98  - PHP
99  - Ruby
100compiled languages: &CLANGS
101  - C/C++
102  - Java
103all languages:
104  - *DLANGS
105  - *CLANGS
106
107# Added in .2.2: Escaped quotes
108- you know, this shouldn't work.  but it does.
109- 'that''s my value.'
110- 'again, that\'s my value.'
111- "here's to \"quotes\", boss."
112
113# added in .2.3
114- {name: "Foo, Bar's", age: 20}
115
116# Added in .2.4: bug [ 1418193 ] Quote Values in Nested Arrays
117- [a, ['1', "2"], b]
118
119# Added in .2.4: malformed YAML
120all
121  javascripts:     [dom1.js, dom.js]
122
123# Added in .2
1241040: Ooo, a numeric key! # And working comments? Wow! Colons in comments: a menace (0.3).
125
126hash_1: Hash #and a comment
127hash_2: "Hash #and a comment"
128"hash#3": "Hash (#) can appear in key too"
129
130float_test: 1.0
131float_test_with_quotes: '1.0'
132float_inverse_test: 001
133
134a_really_large_number: 115792089237316195423570985008687907853269984665640564039457584007913129639936 # 2^256
135
136int array: [ 1, 2, 3 ]
137
138array on several lines:
139  [ 0,  1,  2,  3,  4,  5,  6,  7,  8,  9,
140    10, 11, 12, 13, 14, 15, 16, 17, 18, 19 ]
141
142morelesskey: "<value>"
143
144array_of_zero: [0]
145sophisticated_array_of_zero: {rx: {tx: [0]} }
146
147switches:
148  - { row: 0, col: 0, func: {tx: [0, 1]} }
149
150empty_sequence: [ ]
151empty_hash: { }
152
153special_characters: "[{]]{{]]"
154
155asterisks: "*"
156
157empty_key:
158  :
159    key: value
160
161trailing_colon: "foo:"
162
163multiline_items:
164  - type: SomeItem
165    values: [blah, blah, blah,
166      blah]
167    ints: [2, 54, 12,
168      2143]
169
170many_lines: |
171  A quick
172  fox
173
174
175  jumped
176  over
177
178
179
180
181
182  a lazy
183
184
185
186  dog
187
188
189werte:
190  1: nummer 1
191  0: Stunde 0
192
193noindent_records:
194- record1: value1
195- record2: value2
196
197"a:1": [1000]
198"a:2":
199  - 2000
200
201# [Endloop]
202endloop: |
203  Does this line in the end indeed make Spyc go to an infinite loop?
Note: See TracBrowser for help on using the repository browser.