source: cpp/frams/_demos/loader_test_param.in @ 334

Last change on this file since 334 was 334, checked in by Maciej Komosinski, 9 years ago

More specific error messages on failed deserialization (and the resulting value becomes null)

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