18
18
"data" : { "" : { "" : { "" : 3 } } },
19
19
"result" : 3
20
20
},
21
+ {
22
+ "description" : " Fetches a value from a key that is purely a dot" ,
23
+ "rule" : { "var" : " \\ ." },
24
+ "data" : { "." : 20 },
25
+ "result" : 20
26
+ },
21
27
{
22
28
"description" : " Fetches a value from a key with a dot in it" ,
23
29
"rule" : { "var" : " \\ .key" },
41
47
"rule" : { "var" : " ..\\ .key." },
42
48
"data" : { "" : { "" : { ".key" : { "" : 7 }} }},
43
49
"result" : 7
50
+ },
51
+ {
52
+ "description" : " Escape / as well, which is useful for the scope proposal" ,
53
+ "rule" : { "var" : " \\ /" },
54
+ "data" : { "/" : 8 },
55
+ "result" : 8
56
+ },
57
+ {
58
+ "description" : " Though / doesn't inherently need to be escaped" ,
59
+ "rule" : { "var" : " /" },
60
+ "data" : { "/" : 9 },
61
+ "result" : 9
62
+ },
63
+ {
64
+ "description" : " Dot then empty key" ,
65
+ "rule" : { "var" : " \\ .." },
66
+ "data" : { "." : { "" : 10 } },
67
+ "result" : 10
68
+ },
69
+ {
70
+ "description" : " Empty key then dot" ,
71
+ "rule" : { "var" : " .\\ ." },
72
+ "data" : { "" : { "." : 11 } },
73
+ "result" : 11
74
+ },
75
+ {
76
+ "description" : " Can use backslack in name, too" ,
77
+ "rule" : { "var" : " \\\\ .Hello" },
78
+ "data" : { "\\ " : { "Hello" : 12 } },
79
+ "result" : 12
44
80
}
45
81
]
0 commit comments