-
Notifications
You must be signed in to change notification settings - Fork 0
/
info.yaml
185 lines (153 loc) · 3.12 KB
/
info.yaml
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
#sample demo
"google" : "best to do jobs"
1: "start from sde 1"
--- #seprate as different document
#lists
- google
- facebook
- apple
- amazon
---
cities:
- kathmandu
- pokhara
- dhading
- lalitpur
---
cities: [bhaktapur,chitawan,dharan]
... #end the document
---
#basic datatypes
#String variables
myself: girija gurung
hubby: "coding"
bio: | # stored as the seperate line
this is girija gurung
work as software engineer
#write as single line in multiple lines
message: >
hello
good mormning
dude
#same as hello good mormning dude
#automatically detect its data types acc to the assigned value
number: 324332
marks: 98.95
booleanValue : No #n, N,false,False,FALSE
#same as true -> yes ,y, Y
# dates and time
canonical: 2001-12-15T02:59:43.1Z
valid iso8601: 2001-12-14t21:59:43.10-05:00
space separated: 2001-12-14 21:59:43.10 -5
no time zone (Z): 2001-12-15 2:59:43.10
date (00:00:00Z): 2002-12-14
date: !!timestamp 2002-12-14
#specify the types by using !!
zero: !!int 0
positiveNum: !!int 55
negativeNum: !!int -55
binaryNum: !!int 010101
octalNum: !!int 023457
hexa: !!int 0x45
commaValue: !!int +678_89 # 678.89
ecponentail numbers: 5656.868E88
#boolean
booleanValue: !!bool No
#floating point numbers
marks: !!float 88.90
infinite: !!float .inf
not a num : .nan
#null
location: !!null Null # null Null ~
~: this is null
---
#some advance datatypes
company: !!seq
- employees
- salary
- location
- HR
countries: [nepal,india,usa]
#sparse sequence {some time key will be empty}
- hello
-
- whats up!
- Null
- sup
#nested sequence
- #represent the list []
- kathmandu
- pokhara
- dhading
- lalitpur
-
- footbal
- vollyball
- cricket
#maps
!!map
#nested maps
country: nepal
capital: kathmandu
area: 49.45 km²
population: 1.442 million
#OR
country: nepal
capital: { kathmandu ,rea: 49.45 km², population: 1.442 million }
#pairs : duplicate key also supports {array of hashtables}
pair_ex : !!pairs
- jobs: software developer
- jobs: CTO
#OR
pair_ex : !!pairs [jobs: software developer, jobs: CTO]
#set {for unique value}
name: !!set
? girija
? aayush
? aashish
# this will be on json {
# "name": {
# "girija": null,
# "aayush": null,
#"aashish": null
# }
#}
#dictionary !!omap
college: !!omap
- apex college:
location: mid baneshwor
area: 5454.5
number of student: 5000
- lincoln college:
location: rannibari,samakhusi
area: 656.5
number of student: 2000
#json -> {
# "college": [
# {
# "apex college": {
# "location": "mid baneshwor",
# "area": 5454.5,
# "number of student": 5000
#}
#},
#{
# "lincoln college": {
# "location": "rannibari,samakhusi",
# "area": 656.5,
# "number of student": 2000
#}
#}
#]
#}
#reusing properties using anchors
sounds: &animalsounds #this is the representer of anchors
sound : Bark
color : black
animal:
name : dog
<<: *animalsounds #this will get all properties
animal1:
name : cat
<<: *animalsounds
sound: Meow #this is overriden properties