1{ 2 "Level 1 Examples" : 3 { 4 "level": 1, 5 "variables": { 6 "var" : "value", 7 "hello" : "Hello World!" 8 }, 9 "testcases" : [ 10 ["{var}", "value"], 11 ["{hello}", "Hello%20World%21"] 12 ] 13 }, 14 "Level 2 Examples" : 15 { 16 "level": 2, 17 "variables": { 18 "var" : "value", 19 "hello" : "Hello World!", 20 "path" : "/foo/bar" 21 }, 22 "testcases" : [ 23 ["{+var}", "value"], 24 ["{+hello}", "Hello%20World!"], 25 ["{+path}/here", "/foo/bar/here"], 26 ["here?ref={+path}", "here?ref=/foo/bar"] 27 ] 28 }, 29 "Level 3 Examples" : 30 { 31 "level": 3, 32 "variables": { 33 "var" : "value", 34 "hello" : "Hello World!", 35 "empty" : "", 36 "path" : "/foo/bar", 37 "x" : "1024", 38 "y" : "768" 39 }, 40 "testcases" : [ 41 ["map?{x,y}", "map?1024,768"], 42 ["{x,hello,y}", "1024,Hello%20World%21,768"], 43 ["{+x,hello,y}", "1024,Hello%20World!,768"], 44 ["{+path,x}/here", "/foo/bar,1024/here"], 45 ["{#x,hello,y}", "#1024,Hello%20World!,768"], 46 ["{#path,x}/here", "#/foo/bar,1024/here"], 47 ["X{.var}", "X.value"], 48 ["X{.x,y}", "X.1024.768"], 49 ["{/var}", "/value"], 50 ["{/var,x}/here", "/value/1024/here"], 51 ["{;x,y}", ";x=1024;y=768"], 52 ["{;x,y,empty}", ";x=1024;y=768;empty"], 53 ["{?x,y}", "?x=1024&y=768"], 54 ["{?x,y,empty}", "?x=1024&y=768&empty="], 55 ["?fixed=yes{&x}", "?fixed=yes&x=1024"], 56 ["{&x,y,empty}", "&x=1024&y=768&empty="] 57 ] 58 }, 59 "Level 4 Examples" : 60 { 61 "level": 4, 62 "variables": { 63 "var": "value", 64 "hello": "Hello World!", 65 "path": "/foo/bar", 66 "list": ["red", "green", "blue"], 67 "keys": {"semi": ";", "dot": ".", "comma":","} 68 }, 69 "testcases": [ 70 ["{var:3}", "val"], 71 ["{var:30}", "value"], 72 ["{list}", "red,green,blue"], 73 ["{list*}", "red,green,blue"], 74 ["{keys}", [ 75 "comma,%2C,dot,.,semi,%3B", 76 "comma,%2C,semi,%3B,dot,.", 77 "dot,.,comma,%2C,semi,%3B", 78 "dot,.,semi,%3B,comma,%2C", 79 "semi,%3B,comma,%2C,dot,.", 80 "semi,%3B,dot,.,comma,%2C" 81 ]], 82 ["{keys*}", [ 83 "comma=%2C,dot=.,semi=%3B", 84 "comma=%2C,semi=%3B,dot=.", 85 "dot=.,comma=%2C,semi=%3B", 86 "dot=.,semi=%3B,comma=%2C", 87 "semi=%3B,comma=%2C,dot=.", 88 "semi=%3B,dot=.,comma=%2C" 89 ]], 90 ["{+path:6}/here", "/foo/b/here"], 91 ["{+list}", "red,green,blue"], 92 ["{+list*}", "red,green,blue"], 93 ["{+keys}", [ 94 "comma,,,dot,.,semi,;", 95 "comma,,,semi,;,dot,.", 96 "dot,.,comma,,,semi,;", 97 "dot,.,semi,;,comma,,", 98 "semi,;,comma,,,dot,.", 99 "semi,;,dot,.,comma,," 100 ]], 101 ["{+keys*}", [ 102 "comma=,,dot=.,semi=;", 103 "comma=,,semi=;,dot=.", 104 "dot=.,comma=,,semi=;", 105 "dot=.,semi=;,comma=,", 106 "semi=;,comma=,,dot=.", 107 "semi=;,dot=.,comma=," 108 ]], 109 ["{#path:6}/here", "#/foo/b/here"], 110 ["{#list}", "#red,green,blue"], 111 ["{#list*}", "#red,green,blue"], 112 ["{#keys}", [ 113 "#comma,,,dot,.,semi,;", 114 "#comma,,,semi,;,dot,.", 115 "#dot,.,comma,,,semi,;", 116 "#dot,.,semi,;,comma,,", 117 "#semi,;,comma,,,dot,.", 118 "#semi,;,dot,.,comma,," 119 ]], 120 ["{#keys*}", [ 121 "#comma=,,dot=.,semi=;", 122 "#comma=,,semi=;,dot=.", 123 "#dot=.,comma=,,semi=;", 124 "#dot=.,semi=;,comma=,", 125 "#semi=;,comma=,,dot=.", 126 "#semi=;,dot=.,comma=," 127 ]], 128 ["X{.var:3}", "X.val"], 129 ["X{.list}", "X.red,green,blue"], 130 ["X{.list*}", "X.red.green.blue"], 131 ["X{.keys}", [ 132 "X.comma,%2C,dot,.,semi,%3B", 133 "X.comma,%2C,semi,%3B,dot,.", 134 "X.dot,.,comma,%2C,semi,%3B", 135 "X.dot,.,semi,%3B,comma,%2C", 136 "X.semi,%3B,comma,%2C,dot,.", 137 "X.semi,%3B,dot,.,comma,%2C" 138 ]], 139 ["{/var:1,var}", "/v/value"], 140 ["{/list}", "/red,green,blue"], 141 ["{/list*}", "/red/green/blue"], 142 ["{/list*,path:4}", "/red/green/blue/%2Ffoo"], 143 ["{/keys}", [ 144 "/comma,%2C,dot,.,semi,%3B", 145 "/comma,%2C,semi,%3B,dot,.", 146 "/dot,.,comma,%2C,semi,%3B", 147 "/dot,.,semi,%3B,comma,%2C", 148 "/semi,%3B,comma,%2C,dot,.", 149 "/semi,%3B,dot,.,comma,%2C" 150 ]], 151 ["{/keys*}", [ 152 "/comma=%2C/dot=./semi=%3B", 153 "/comma=%2C/semi=%3B/dot=.", 154 "/dot=./comma=%2C/semi=%3B", 155 "/dot=./semi=%3B/comma=%2C", 156 "/semi=%3B/comma=%2C/dot=.", 157 "/semi=%3B/dot=./comma=%2C" 158 ]], 159 ["{;hello:5}", ";hello=Hello"], 160 ["{;list}", ";list=red,green,blue"], 161 ["{;list*}", ";list=red;list=green;list=blue"], 162 ["{;keys}", [ 163 ";keys=comma,%2C,dot,.,semi,%3B", 164 ";keys=comma,%2C,semi,%3B,dot,.", 165 ";keys=dot,.,comma,%2C,semi,%3B", 166 ";keys=dot,.,semi,%3B,comma,%2C", 167 ";keys=semi,%3B,comma,%2C,dot,.", 168 ";keys=semi,%3B,dot,.,comma,%2C" 169 ]], 170 ["{;keys*}", [ 171 ";comma=%2C;dot=.;semi=%3B", 172 ";comma=%2C;semi=%3B;dot=.", 173 ";dot=.;comma=%2C;semi=%3B", 174 ";dot=.;semi=%3B;comma=%2C", 175 ";semi=%3B;comma=%2C;dot=.", 176 ";semi=%3B;dot=.;comma=%2C" 177 ]], 178 ["{?var:3}", "?var=val"], 179 ["{?list}", "?list=red,green,blue"], 180 ["{?list*}", "?list=red&list=green&list=blue"], 181 ["{?keys}", [ 182 "?keys=comma,%2C,dot,.,semi,%3B", 183 "?keys=comma,%2C,semi,%3B,dot,.", 184 "?keys=dot,.,comma,%2C,semi,%3B", 185 "?keys=dot,.,semi,%3B,comma,%2C", 186 "?keys=semi,%3B,comma,%2C,dot,.", 187 "?keys=semi,%3B,dot,.,comma,%2C" 188 ]], 189 ["{?keys*}", [ 190 "?comma=%2C&dot=.&semi=%3B", 191 "?comma=%2C&semi=%3B&dot=.", 192 "?dot=.&comma=%2C&semi=%3B", 193 "?dot=.&semi=%3B&comma=%2C", 194 "?semi=%3B&comma=%2C&dot=.", 195 "?semi=%3B&dot=.&comma=%2C" 196 ]], 197 ["{&var:3}", "&var=val"], 198 ["{&list}", "&list=red,green,blue"], 199 ["{&list*}", "&list=red&list=green&list=blue"], 200 ["{&keys}", [ 201 "&keys=comma,%2C,dot,.,semi,%3B", 202 "&keys=comma,%2C,semi,%3B,dot,.", 203 "&keys=dot,.,comma,%2C,semi,%3B", 204 "&keys=dot,.,semi,%3B,comma,%2C", 205 "&keys=semi,%3B,comma,%2C,dot,.", 206 "&keys=semi,%3B,dot,.,comma,%2C" 207 ]], 208 ["{&keys*}", [ 209 "&comma=%2C&dot=.&semi=%3B", 210 "&comma=%2C&semi=%3B&dot=.", 211 "&dot=.&comma=%2C&semi=%3B", 212 "&dot=.&semi=%3B&comma=%2C", 213 "&semi=%3B&comma=%2C&dot=.", 214 "&semi=%3B&dot=.&comma=%2C" 215 ]] 216 ] 217 } 218} 219