Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions samples/array-member.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
return {
["arr"] = {
[1] = {
["prop1"] = {
["subprop1"] = "test",
["subprop2"] = {
["test2"] = "test",
["test3"] = {}
}
}
},
[2] = {
["prop2"] = {
["subprop3"] = "test.test"
}
},
[3] = {
["prop3"] = {
["subprop4"] = 5
}
}
}
}
11 changes: 11 additions & 0 deletions samples/array-member.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
arr:
- prop1:
subprop1: test
subprop2:
test2: test
test3: {}
- prop2:
subprop3: test.test
- prop3:
subprop4: 5
20 changes: 20 additions & 0 deletions samples/comments.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
return {
["key"] = {"value line 1", "value line 2", "value line 3"},
["key2"] = 30,
["key3"] = "String value",
["key4"] = "#not a comment",
["key5"] = false,
["key6"] = 123,
["key7"] = {
["key8"] = "value",
["key9"] = "not#comments"
},
["key10"] = {1, 2},
["key11"] = "[3, 4] it is another string",
["key12"] = "[5, 6] StrinG",
["key13"] = {7, 8},
["key14"] = "[9, 10] StrinG",
["key15"] = "[11, 12] StrinG# notcomment",
["key16"] = {13, 14},
["key17"] = "[15, 16] string"
}
26 changes: 26 additions & 0 deletions samples/comments.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
key: #comment after id
- value line 1
#comment before list item
- value line 2
#comment
#multi
#line
- value line 3 #Comment after list item
key2: 30 # comment 5
key3: "String value" # comment after string with quotes
key4: "#not a comment"
key5: false # Comment boolean
key6: 123 # Comment number
key7:
key8: value # Comment simple string
key9: not#comments #Comment simple string with # inside and multiple #

key10: [1, 2]
key11: [3, 4] it is another string # and after comment
key12: [5, 6] StrinG # Another language comment: кирилица ёпрст
key13: [7, 8]
key14: [9, 10] StrinG # Comment with spaces and #more #more # comment
key15: [11, 12] StrinG# notcomment # comment
key16: [13, 14] #comment
key17: [15, 16] string
12 changes: 6 additions & 6 deletions samples/dates.lua
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
return {
["date0"] = 1305907200,
["date1"] = 1305907200,
["date2"] = 1293897600,
["date3"] = 1298282160,
["date4"] = 1303335300,
["date5"] = 1307018730
["date0"] = os.time{year=2011, month=5, day=21, hour=0, min=0, sec=0, isdst=false},
["date1"] = os.time{year=2011, month=5, day=21, hour=0, min=0, sec=0, isdst=false},
["date2"] = os.time{year=2011, month=1, day=2, hour=0, min=0, sec=0, isdst=false},
["date3"] = os.time{year=2011, month=2, day=21, hour=17, min=56, sec=0, isdst=false},
["date4"] = os.time{year=2011, month=4, day=21, hour=5, min=35, sec=0, isdst=false},
["date5"] = os.time{year=2011, month=6, day=2, hour=20, min=45, sec=30, isdst=false}
}
47 changes: 28 additions & 19 deletions samples/hash.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,29 @@
---
users:
tj:
name: tj
age: 23
email: 'tj@vision-media.ca'
bob:
name: 'bob'
age: 27
ted: { name: ted, age: 32, email: ted@tedtalks.com }
country:
name: Österreich
website: http://en.wikipedia.org/wiki/Austria
space:
description: space, the final frontier
brackets:
square: Square [brackets] can go in the middle of strings
squiggle: Squiggle {brackets} can also go in the middle of strings!
extrasquare: [Scratch that] brackets can go at the beginning as long as they close and have text after.
extrasquiggle: {Scratch that} squigs can go at the beginning also!
users:
tj:
name: tj
age: 23
email: 'tj@vision-media.ca'
bob:
name: 'bob'
age: 27
ted: { name: ted, age: 32, email: ted@tedtalks.com }



country:
name: Österreich
website: http://en.wikipedia.org/wiki/Austria

space:
description: space, the final frontier

brackets:
square: Square [brackets] can go in the middle of strings


squiggle: Squiggle {brackets} can also go in the middle of strings!

extrasquare: [Scratch that] brackets can go at the beginning as long as they close and have text after.

extrasquiggle: {Scratch that} squigs can go at the beginning also!
2 changes: 1 addition & 1 deletion samples/invoice.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Suite #292",
["family"] = "Dumars",
["given"] = "Chris"
},
["date"] = 980179200,
["date"] = os.time{year=2001, month=1, day=23, hour=0, min=0, sec=0, isdst=false},
["invoice"] = 34843,
["ship-to"] = {
["address"] = {
Expand Down
2 changes: 1 addition & 1 deletion samples/log.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
return {
["Time"] = 1006498902,
["Time"] = os.time{year=2001, month=11, day=23, hour=10, min=1, sec=42, isdst=false} ,
["User"] = "ed",
["Warning"] = "This is an error message\
for the log file"
Expand Down
2 changes: 1 addition & 1 deletion samples/log2.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
return {
["Time"] = 1006498951,
["Time"] = os.time{year=2001, month=11, day=23, hour=10, min=2, sec=31, isdst=false},
["User"] = "ed",
["Warning"] = "A slightly different error\
message."
Expand Down
2 changes: 1 addition & 1 deletion samples/log3.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
return {
["Date"] = 1006498997,
["Date"] = os.time{year=2001, month=11, day=23, hour=10, min=3, sec=17, isdst=false},
["Fatal"] = "Unknown variable \"bar\"",
["Stack"] = {
[1] = {
Expand Down
2 changes: 1 addition & 1 deletion samples/log4.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
return {
["Date"] = 1006498997,
["Date"] = os.time{year=2001, month=11, day=23, hour=10, min=3, sec=17, isdst=false},
["Fatal"] = "Unknown variable \"bar\"",
["Stack"] = {
[1] = {
Expand Down
4 changes: 4 additions & 0 deletions samples/negative-prop.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
return {
prop1 = -1,
prop2 = -1.5,
}
3 changes: 3 additions & 0 deletions samples/negative-prop.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
prop1: -1
prop2: -1.5
Loading