1 | #this is comment1 |
---|
2 | # this is comment2 |
---|
3 | data: |
---|
4 | text:qwerty |
---|
5 | longtext:~ |
---|
6 | Long multiline text |
---|
7 | 1\\~ |
---|
8 | 22\~\n |
---|
9 | 333\ \\ |
---|
10 | 4444~ |
---|
11 | deftext:other |
---|
12 | i1:-12345 |
---|
13 | i2:-0X10 |
---|
14 | i3:2 |
---|
15 | f4:22222 |
---|
16 | f3:2222 |
---|
17 | f2:222 |
---|
18 | f1:22 |
---|
19 | f4:2 |
---|
20 | x1:3.14 |
---|
21 | x2:314 |
---|
22 | notloaded:44 |
---|
23 | notchanged:444 |
---|
24 | notsaved:4444 |
---|
25 | nosuchfield:value |
---|
26 | |
---|
27 | #all fields except x1 will have default values |
---|
28 | data: |
---|
29 | x1:just x (string extvalue) |
---|
30 | |
---|
31 | someotherdata: |
---|
32 | this_object:will be ignored |
---|
33 | because:we only load "data:" objects |
---|
34 | |
---|
35 | data: |
---|
36 | text:abcdefghijklmnopqrstuvwxyz |
---|
37 | i1:notanumber |
---|
38 | i2:-99999 |
---|
39 | i3:+99999 |
---|
40 | i4:notanumber_with_default |
---|
41 | f1:-0x100 |
---|
42 | f2:-1e |
---|
43 | f3:+1e1 |
---|
44 | f4:1ee |
---|
45 | x1:@Serialized:[1,2,3,1.00000,2e0,3.0,"x","]","\""] |
---|
46 | x2:@Serialized:{"a":[1,2,3],"b":"abc","c":1.23} |
---|
47 | |
---|
48 | data: |
---|
49 | i1:+0X10 |
---|
50 | i2:1e2 |
---|
51 | i3:-10 |
---|
52 | x1:next line will overwrite this |
---|
53 | x1:@Serialized:{"a":[1,2,3],"b":^1,"c":^1} |
---|
54 | x2:@Serialized:[[100,^1],["abc"],[300,^2]] |
---|
55 | i3:5 |
---|
56 | |
---|
57 | #invalid serialization examples ahead |
---|
58 | data: |
---|
59 | # ^2 references the object occuring after the reference - only back references are allowed (here: ^0=whole object or ^1=[1,2,3]) |
---|
60 | x1:@Serialized:[[1,2,3],^2,[3,2,1]] |
---|
61 | # ^3 references the nonexistent objects (the last one is ^2=[3,2,1]) |
---|
62 | x1:@Serialized:[[1,2,3],^3,[3,2,1]] |
---|
63 | # whitespaces are not allowed (except before numeric types, as a side effect of "whitespace+number" being valid number) |
---|
64 | x2:@Serialized:[1, 2, "3", { "key" : "value" }] |
---|