| 1 | From 7c635516813a34aa7fb6d3192d3b55ba219aa5c1 Mon Sep 17 00:00:00 2001
|
| 2 | From: Alessandro Astone <[email protected]>
|
| 3 | Date: Tue, 17 Sep 2024 12:10:22 +0200
|
| 4 | Subject: [PATCH] tests: JSON strings should use double-quotes
|
| 5 |
|
| 6 | libjson-glib allowed single-quotes up until 1.10.0;
|
| 7 | change all the hard-coded json string literals to use double-quotes.
|
| 8 |
|
| 9 | Fixes: #50
|
| 10 | ---
|
| 11 | gdata/tests/calendar.c | 316 ++++++++--------
|
| 12 | gdata/tests/general.c | 38 +-
|
| 13 | gdata/tests/streams.c | 46 +--
|
| 14 | gdata/tests/youtube.c | 806 ++++++++++++++++++++---------------------
|
| 15 | 4 files changed, 603 insertions(+), 603 deletions(-)
|
| 16 |
|
| 17 | diff --git a/gdata/tests/calendar.c b/gdata/tests/calendar.c
|
| 18 | index a3302dee..d7807633 100644
|
| 19 | |
| 20 | |
| 21 | @@ -615,35 +615,35 @@ test_event_json (void)
|
| 22 |
|
| 23 | /* Check the JSON */
|
| 24 | gdata_test_assert_json (event, "{"
|
| 25 | - "'summary': 'Tennis with Beth',"
|
| 26 | - "'description': 'Meet for a quick lesson.',"
|
| 27 | - "'kind': 'calendar#event',"
|
| 28 | - "'status': 'confirmed',"
|
| 29 | - "'transparency': 'opaque',"
|
| 30 | - "'guestsCanModify': false,"
|
| 31 | - "'guestsCanInviteOthers': false,"
|
| 32 | - "'guestsCanSeeOtherGuests': false,"
|
| 33 | - "'anyoneCanAddSelf': false,"
|
| 34 | - "'start': {"
|
| 35 | - "'dateTime': '2009-04-17T15:00:00Z',"
|
| 36 | - "'timeZone': 'UTC'"
|
| 37 | + "\"summary\": \"Tennis with Beth\","
|
| 38 | + "\"description\": \"Meet for a quick lesson.\","
|
| 39 | + "\"kind\": \"calendar#event\","
|
| 40 | + "\"status\": \"confirmed\","
|
| 41 | + "\"transparency\": \"opaque\","
|
| 42 | + "\"guestsCanModify\": false,"
|
| 43 | + "\"guestsCanInviteOthers\": false,"
|
| 44 | + "\"guestsCanSeeOtherGuests\": false,"
|
| 45 | + "\"anyoneCanAddSelf\": false,"
|
| 46 | + "\"start\": {"
|
| 47 | + "\"dateTime\": \"2009-04-17T15:00:00Z\","
|
| 48 | + "\"timeZone\": \"UTC\""
|
| 49 | "},"
|
| 50 | - "'end': {"
|
| 51 | - "'dateTime': '2009-04-17T17:00:00Z',"
|
| 52 | - "'timeZone': 'UTC'"
|
| 53 | + "\"end\": {"
|
| 54 | + "\"dateTime\": \"2009-04-17T17:00:00Z\","
|
| 55 | + "\"timeZone\": \"UTC\""
|
| 56 | "},"
|
| 57 | - "'attendees': ["
|
| 58 | + "\"attendees\": ["
|
| 59 | "{"
|
| 60 | - "'email': '[email protected]',"
|
| 61 | - "'displayName': 'John Smith‽',"
|
| 62 | - "'organizer': true"
|
| 63 | + "\"email\": \"[email protected]\","
|
| 64 | + "\"displayName\": \"John Smith‽\","
|
| 65 | + "\"organizer\": true"
|
| 66 | "}"
|
| 67 | "],"
|
| 68 | - "'organizer': {"
|
| 69 | - "'email': '[email protected]',"
|
| 70 | - "'displayName': 'John Smith‽'"
|
| 71 | + "\"organizer\": {"
|
| 72 | + "\"email\": \"[email protected]\","
|
| 73 | + "\"displayName\": \"John Smith‽\""
|
| 74 | "},"
|
| 75 | - "'location': 'Rolling Lawn Courts'"
|
| 76 | + "\"location\": \"Rolling Lawn Courts\""
|
| 77 | "}");
|
| 78 | }
|
| 79 |
|
| 80 | @@ -668,45 +668,45 @@ test_event_json_attendees (void)
|
| 81 | GError *error = NULL;
|
| 82 |
|
| 83 | event = GDATA_CALENDAR_EVENT (gdata_parsable_new_from_json (GDATA_TYPE_CALENDAR_EVENT, "{"
|
| 84 | - "'kind': 'calendar#event',"
|
| 85 | - "'id': 'some-id',"
|
| 86 | - "'created': '2017-02-04T17:53:47.000Z',"
|
| 87 | - "'summary': 'Duff this',"
|
| 88 | - "'organizer': {"
|
| 89 | - "'email': '[email protected]',"
|
| 90 | - "'displayName': 'Ruth Pettut'"
|
| 91 | + "\"kind\": \"calendar#event\","
|
| 92 | + "\"id\": \"some-id\","
|
| 93 | + "\"created\": \"2017-02-04T17:53:47.000Z\","
|
| 94 | + "\"summary\": \"Duff this\","
|
| 95 | + "\"organizer\": {"
|
| 96 | + "\"email\": \"[email protected]\","
|
| 97 | + "\"displayName\": \"Ruth Pettut\""
|
| 98 | "},"
|
| 99 | - "'attendees': ["
|
| 100 | + "\"attendees\": ["
|
| 101 | "{"
|
| 102 | - "'email': '[email protected]',"
|
| 103 | - "'displayName': 'Joe Hibbs',"
|
| 104 | - "'responseStatus': 'accepted'"
|
| 105 | + "\"email\": \"[email protected]\","
|
| 106 | + "\"displayName\": \"Joe Hibbs\","
|
| 107 | + "\"responseStatus\": \"accepted\""
|
| 108 | "},"
|
| 109 | "{"
|
| 110 | - "'email': '[email protected]',"
|
| 111 | - "'displayName': 'Me McMeeson',"
|
| 112 | - "'self': true,"
|
| 113 | - "'responseStatus': 'needsAction'"
|
| 114 | + "\"email\": \"[email protected]\","
|
| 115 | + "\"displayName\": \"Me McMeeson\","
|
| 116 | + "\"self\": true,"
|
| 117 | + "\"responseStatus\": \"needsAction\""
|
| 118 | "},"
|
| 119 | "{"
|
| 120 | - "'email': '[email protected]',"
|
| 121 | - "'responseStatus': 'needsAction'"
|
| 122 | + "\"email\": \"[email protected]\","
|
| 123 | + "\"responseStatus\": \"needsAction\""
|
| 124 | "},"
|
| 125 | "{"
|
| 126 | - "'email': '[email protected]',"
|
| 127 | - "'displayName': 'Example Person 3',"
|
| 128 | - "'responseStatus': 'tentative',"
|
| 129 | - "'comment': 'Some poor excuse about not coming.'"
|
| 130 | + "\"email\": \"[email protected]\","
|
| 131 | + "\"displayName\": \"Example Person 3\","
|
| 132 | + "\"responseStatus\": \"tentative\","
|
| 133 | + "\"comment\": \"Some poor excuse about not coming.\""
|
| 134 | "},"
|
| 135 | "{"
|
| 136 | - "'email': '[email protected]',"
|
| 137 | - "'responseStatus': 'accepted'"
|
| 138 | + "\"email\": \"[email protected]\","
|
| 139 | + "\"responseStatus\": \"accepted\""
|
| 140 | "},"
|
| 141 | "{"
|
| 142 | - "'email': '[email protected]',"
|
| 143 | - "'displayName': 'Ruth Pettut',"
|
| 144 | - "'organizer': true,"
|
| 145 | - "'responseStatus': 'accepted'"
|
| 146 | + "\"email\": \"[email protected]\","
|
| 147 | + "\"displayName\": \"Ruth Pettut\","
|
| 148 | + "\"organizer\": true,"
|
| 149 | + "\"responseStatus\": \"accepted\""
|
| 150 | "}"
|
| 151 | "]"
|
| 152 | "}", -1, &error));
|
| 153 | @@ -754,38 +754,38 @@ test_event_json_dates (void)
|
| 154 | const gchar *output_json; /* NULL if equal to @json */
|
| 155 | } test_vectors[] = {
|
| 156 | /* Plain date, single day. */
|
| 157 | - { "'start': {"
|
| 158 | - "'date': '2009-04-17',"
|
| 159 | - "'timeZone': 'UTC'"
|
| 160 | + { "\"start\": {"
|
| 161 | + "\"date\": \"2009-04-17\","
|
| 162 | + "\"timeZone\": \"UTC\""
|
| 163 | "},"
|
| 164 | - "'end': {"
|
| 165 | - "'date': '2009-04-18',"
|
| 166 | - "'timeZone': 'UTC'"
|
| 167 | + "\"end\": {"
|
| 168 | + "\"date\": \"2009-04-18\","
|
| 169 | + "\"timeZone\": \"UTC\""
|
| 170 | "}", TRUE, 1239926400, 1239926400 + 86400, NULL },
|
| 171 | /* Full date and time. */
|
| 172 | - { "'start': {"
|
| 173 | - "'dateTime': '2009-04-17T15:00:00Z',"
|
| 174 | - "'timeZone': 'UTC'"
|
| 175 | + { "\"start\": {"
|
| 176 | + "\"dateTime\": \"2009-04-17T15:00:00Z\","
|
| 177 | + "\"timeZone\": \"UTC\""
|
| 178 | "},"
|
| 179 | - "'end': {"
|
| 180 | - "'dateTime': '2009-04-17T16:00:00Z',"
|
| 181 | - "'timeZone': 'UTC'"
|
| 182 | + "\"end\": {"
|
| 183 | + "\"dateTime\": \"2009-04-17T16:00:00Z\","
|
| 184 | + "\"timeZone\": \"UTC\""
|
| 185 | "}", FALSE, 1239926400 + 54000, 1239926400 + 54000 + 3600, NULL },
|
| 186 | /* Start and end time. */
|
| 187 | - { "'start': {"
|
| 188 | - "'date': '2009-04-27',"
|
| 189 | - "'timeZone': 'UTC'"
|
| 190 | + { "\"start\": {"
|
| 191 | + "\"date\": \"2009-04-27\","
|
| 192 | + "\"timeZone\": \"UTC\""
|
| 193 | "},"
|
| 194 | - "'end': {"
|
| 195 | - "'date': '20090506',"
|
| 196 | - "'timeZone': 'UTC'"
|
| 197 | - "}", TRUE, 1239926400 + 864000, 1241568000, "'start': {"
|
| 198 | - "'date': '2009-04-27',"
|
| 199 | - "'timeZone': 'UTC'"
|
| 200 | + "\"end\": {"
|
| 201 | + "\"date\": \"20090506\","
|
| 202 | + "\"timeZone\": \"UTC\""
|
| 203 | + "}", TRUE, 1239926400 + 864000, 1241568000, "\"start\": {"
|
| 204 | + "\"date\": \"2009-04-27\","
|
| 205 | + "\"timeZone\": \"UTC\""
|
| 206 | "},"
|
| 207 | - "'end': {"
|
| 208 | - "'date': '2009-05-06',"
|
| 209 | - "'timeZone': 'UTC'"
|
| 210 | + "\"end\": {"
|
| 211 | + "\"date\": \"2009-05-06\","
|
| 212 | + "\"timeZone\": \"UTC\""
|
| 213 | "}" },
|
| 214 | };
|
| 215 |
|
| 216 | @@ -798,20 +798,20 @@ test_event_json_dates (void)
|
| 217 | GError *error = NULL;
|
| 218 |
|
| 219 | json = g_strdup_printf ("{"
|
| 220 | - "'summary': 'Tennis with Beth',"
|
| 221 | - "'description': 'Meet for a quick lesson.',"
|
| 222 | - "'kind': 'calendar#event',"
|
| 223 | + "\"summary\": \"Tennis with Beth\","
|
| 224 | + "\"description\": \"Meet for a quick lesson.\","
|
| 225 | + "\"kind\": \"calendar#event\","
|
| 226 | "%s"
|
| 227 | "}", test_vectors[i].json);
|
| 228 | output_json = g_strdup_printf ("{"
|
| 229 | - "'summary': 'Tennis with Beth',"
|
| 230 | - "'description': 'Meet for a quick lesson.',"
|
| 231 | - "'kind': 'calendar#event',"
|
| 232 | - "'guestsCanModify': false,"
|
| 233 | - "'guestsCanInviteOthers': false,"
|
| 234 | - "'guestsCanSeeOtherGuests': false,"
|
| 235 | - "'anyoneCanAddSelf': false,"
|
| 236 | - "'attendees': [],"
|
| 237 | + "\"summary\": \"Tennis with Beth\","
|
| 238 | + "\"description\": \"Meet for a quick lesson.\","
|
| 239 | + "\"kind\": \"calendar#event\","
|
| 240 | + "\"guestsCanModify\": false,"
|
| 241 | + "\"guestsCanInviteOthers\": false,"
|
| 242 | + "\"guestsCanSeeOtherGuests\": false,"
|
| 243 | + "\"anyoneCanAddSelf\": false,"
|
| 244 | + "\"attendees\": [],"
|
| 245 | "%s"
|
| 246 | "}", (test_vectors[i].output_json != NULL) ? test_vectors[i].output_json : test_vectors[i].json);
|
| 247 |
|
| 248 | @@ -852,20 +852,20 @@ test_event_json_organizer (void)
|
| 249 | GError *error = NULL;
|
| 250 |
|
| 251 | event = GDATA_CALENDAR_EVENT (gdata_parsable_new_from_json (GDATA_TYPE_CALENDAR_EVENT, "{"
|
| 252 | - "'kind': 'calendar#event',"
|
| 253 | - "'id': 'some-id',"
|
| 254 | - "'created': '2013-12-22T18:00:00.000Z',"
|
| 255 | - "'summary': 'FOSDEM GNOME Beer Event',"
|
| 256 | - "'organizer': {"
|
| 257 | - "'id': 'another-id',"
|
| 258 | - "'displayName': 'Guillaume Desmottes'"
|
| 259 | + "\"kind\": \"calendar#event\","
|
| 260 | + "\"id\": \"some-id\","
|
| 261 | + "\"created\": \"2013-12-22T18:00:00.000Z\","
|
| 262 | + "\"summary\": \"FOSDEM GNOME Beer Event\","
|
| 263 | + "\"organizer\": {"
|
| 264 | + "\"id\": \"another-id\","
|
| 265 | + "\"displayName\": \"Guillaume Desmottes\""
|
| 266 | "},"
|
| 267 | - "'attendees': ["
|
| 268 | + "\"attendees\": ["
|
| 269 | "{"
|
| 270 | - "'id': 'another-id',"
|
| 271 | - "'displayName': 'Guillaume Desmottes',"
|
| 272 | - "'organizer': true,"
|
| 273 | - "'responseStatus': 'accepted'"
|
| 274 | + "\"id\": \"another-id\","
|
| 275 | + "\"displayName\": \"Guillaume Desmottes\","
|
| 276 | + "\"organizer\": true,"
|
| 277 | + "\"responseStatus\": \"accepted\""
|
| 278 | "}"
|
| 279 | "]"
|
| 280 | "}", -1, &error));
|
| 281 | @@ -884,56 +884,56 @@ test_event_json_recurrence (void)
|
| 282 | gchar *id, *uri;
|
| 283 |
|
| 284 | event = GDATA_CALENDAR_EVENT (gdata_parsable_new_from_json (GDATA_TYPE_CALENDAR_EVENT, "{"
|
| 285 | - "'id': 'https://www.googleapis.com/calendar/v3/calendars/[email protected]/events/g5928e82rrch95b25f8ud0dlsg_20090429T153000Z',"
|
| 286 | - "'updated': '2009-04-27T17:54:10.000Z',"
|
| 287 | - "'summary': 'Test daily instance event',"
|
| 288 | - "'kind': 'calendar#event',"
|
| 289 | - "'creator': {"
|
| 290 | - "'displayName': 'GData Test',"
|
| 291 | - "'email': '[email protected]'"
|
| 292 | + "\"id\": \"https://www.googleapis.com/calendar/v3/calendars/[email protected]/events/g5928e82rrch95b25f8ud0dlsg_20090429T153000Z\","
|
| 293 | + "\"updated\": \"2009-04-27T17:54:10.000Z\","
|
| 294 | + "\"summary\": \"Test daily instance event\","
|
| 295 | + "\"kind\": \"calendar#event\","
|
| 296 | + "\"creator\": {"
|
| 297 | + "\"displayName\": \"GData Test\","
|
| 298 | + "\"email\": \"[email protected]\""
|
| 299 | "},"
|
| 300 | - "'recurringEventId': 'g5928e82rrch95b25f8ud0dlsg',"
|
| 301 | - "'originalStartTime': {"
|
| 302 | - "'dateTime': '2009-04-29T16:30:00.000+01:00',"
|
| 303 | - "'timeZone': 'UTC'"
|
| 304 | + "\"recurringEventId\": \"g5928e82rrch95b25f8ud0dlsg\","
|
| 305 | + "\"originalStartTime\": {"
|
| 306 | + "\"dateTime\": \"2009-04-29T16:30:00.000+01:00\","
|
| 307 | + "\"timeZone\": \"UTC\""
|
| 308 | "},"
|
| 309 | - "'guestsCanModify': false,"
|
| 310 | - "'guestsCanInviteOthers': false,"
|
| 311 | - "'guestsCanSeeOtherGuests': false,"
|
| 312 | - "'anyoneCanAddSelf': false,"
|
| 313 | - "'status': 'confirmed',"
|
| 314 | - "'visibility': 'private',"
|
| 315 | - "'transparency': 'opaque',"
|
| 316 | - "'iCalUID': '[email protected]',"
|
| 317 | - "'sequence': '0',"
|
| 318 | - "'start': {"
|
| 319 | - "'dateTime': '2009-04-29T17:30:00.000+01:00',"
|
| 320 | - "'timeZone': 'UTC'"
|
| 321 | + "\"guestsCanModify\": false,"
|
| 322 | + "\"guestsCanInviteOthers\": false,"
|
| 323 | + "\"guestsCanSeeOtherGuests\": false,"
|
| 324 | + "\"anyoneCanAddSelf\": false,"
|
| 325 | + "\"status\": \"confirmed\","
|
| 326 | + "\"visibility\": \"private\","
|
| 327 | + "\"transparency\": \"opaque\","
|
| 328 | + "\"iCalUID\": \"[email protected]\","
|
| 329 | + "\"sequence\": \"0\","
|
| 330 | + "\"start\": {"
|
| 331 | + "\"dateTime\": \"2009-04-29T17:30:00.000+01:00\","
|
| 332 | + "\"timeZone\": \"UTC\""
|
| 333 | "},"
|
| 334 | - "'end': {"
|
| 335 | - "'dateTime': '2009-04-29T17:30:00.000+01:00',"
|
| 336 | - "'timeZone': 'UTC'"
|
| 337 | + "\"end\": {"
|
| 338 | + "\"dateTime\": \"2009-04-29T17:30:00.000+01:00\","
|
| 339 | + "\"timeZone\": \"UTC\""
|
| 340 | "},"
|
| 341 | - "'reminders': {"
|
| 342 | - "'overrides': [{"
|
| 343 | - "'method': 'email',"
|
| 344 | - "'minutes': 10"
|
| 345 | + "\"reminders\": {"
|
| 346 | + "\"overrides\": [{"
|
| 347 | + "\"method\": \"email\","
|
| 348 | + "\"minutes\": 10"
|
| 349 | "}, {"
|
| 350 | - "'method': 'popup',"
|
| 351 | - "'minutes': 10"
|
| 352 | + "\"method\": \"popup\","
|
| 353 | + "\"minutes\": 10"
|
| 354 | "}]"
|
| 355 | "},"
|
| 356 | - "'attendees': ["
|
| 357 | + "\"attendees\": ["
|
| 358 | "{"
|
| 359 | - "'email': '[email protected]',"
|
| 360 | - "'displayName': 'GData Test',"
|
| 361 | - "'organizer': true,"
|
| 362 | - "'responseStatus': 'needsAction'"
|
| 363 | + "\"email\": \"[email protected]\","
|
| 364 | + "\"displayName\": \"GData Test\","
|
| 365 | + "\"organizer\": true,"
|
| 366 | + "\"responseStatus\": \"needsAction\""
|
| 367 | "}"
|
| 368 | "],"
|
| 369 | - "'organizer': {"
|
| 370 | - "'email': '[email protected]',"
|
| 371 | - "'displayName': 'GData Test'"
|
| 372 | + "\"organizer\": {"
|
| 373 | + "\"email\": \"[email protected]\","
|
| 374 | + "\"displayName\": \"GData Test\""
|
| 375 | "}"
|
| 376 | "}", -1, &error));
|
| 377 | g_assert_no_error (error);
|
| 378 | @@ -962,11 +962,11 @@ test_calendar_escaping (void)
|
| 379 |
|
| 380 | /* Check the outputted JSON is escaped properly */
|
| 381 | gdata_test_assert_json (calendar, "{"
|
| 382 | - "'kind': 'calendar#calendar',"
|
| 383 | - "'timeZone': '<timezone>',"
|
| 384 | - "'hidden': false,"
|
| 385 | - "'backgroundColor': '#000000',"
|
| 386 | - "'selected': false"
|
| 387 | + "\"kind\": \"calendar#calendar\","
|
| 388 | + "\"timeZone\": \"<timezone>\","
|
| 389 | + "\"hidden\": false,"
|
| 390 | + "\"backgroundColor\": \"#000000\","
|
| 391 | + "\"selected\": false"
|
| 392 | "}");
|
| 393 | g_object_unref (calendar);
|
| 394 | }
|
| 395 | @@ -985,17 +985,17 @@ test_event_escaping (void)
|
| 396 |
|
| 397 | /* Check the outputted JSON is escaped properly */
|
| 398 | gdata_test_assert_json (event, "{"
|
| 399 | - "'kind': 'calendar#event',"
|
| 400 | - "'status': '\"status\"',"
|
| 401 | - "'transparency': '\"transparency\"',"
|
| 402 | - "'visibility': '\"visibility\"',"
|
| 403 | - "'iCalUID': '\"uid\"',"
|
| 404 | - "'recurrence': [ '\"recurrence\"' ],"
|
| 405 | - "'guestsCanModify': false,"
|
| 406 | - "'guestsCanInviteOthers': false,"
|
| 407 | - "'guestsCanSeeOtherGuests': false,"
|
| 408 | - "'anyoneCanAddSelf': false,"
|
| 409 | - "'attendees': []"
|
| 410 | + "\"kind\": \"calendar#event\","
|
| 411 | + "\"status\": \"\\\"status\\\"\","
|
| 412 | + "\"transparency\": \"\\\"transparency\\\"\","
|
| 413 | + "\"visibility\": \"\\\"visibility\\\"\","
|
| 414 | + "\"iCalUID\": \"\\\"uid\\\"\","
|
| 415 | + "\"recurrence\": [ \"\\\"recurrence\\\"\" ],"
|
| 416 | + "\"guestsCanModify\": false,"
|
| 417 | + "\"guestsCanInviteOthers\": false,"
|
| 418 | + "\"guestsCanSeeOtherGuests\": false,"
|
| 419 | + "\"anyoneCanAddSelf\": false,"
|
| 420 | + "\"attendees\": []"
|
| 421 | "}");
|
| 422 | g_object_unref (event);
|
| 423 | }
|
| 424 | @@ -1092,11 +1092,11 @@ test_access_rule_json (void)
|
| 425 |
|
| 426 | /* Check the JSON */
|
| 427 | gdata_test_assert_json (rule, "{"
|
| 428 | - "'kind': 'calendar#aclRule',"
|
| 429 | - "'role': 'writer',"
|
| 430 | - "'scope': {"
|
| 431 | - "'type': 'user',"
|
| 432 | - "'value': '[email protected]'"
|
| 433 | + "\"kind\": \"calendar#aclRule\","
|
| 434 | + "\"role\": \"writer\","
|
| 435 | + "\"scope\": {"
|
| 436 | + "\"type\": \"user\","
|
| 437 | + "\"value\": \"[email protected]\""
|
| 438 | "}"
|
| 439 | "}");
|
| 440 | }
|
| 441 | diff --git a/gdata/tests/general.c b/gdata/tests/general.c
|
| 442 | index 57f3e8e7..d195eff9 100644
|
| 443 | |
| 444 | |
| 445 | @@ -2368,27 +2368,27 @@ test_app_categories (void)
|
| 446 |
|
| 447 | categories = GDATA_APP_CATEGORIES (gdata_parsable_new_from_json (GDATA_TYPE_APP_CATEGORIES,
|
| 448 | "{"
|
| 449 | - "'kind': 'youtube#videoCategoryListResponse',"
|
| 450 | - "'etag': '\"tbWC5XrSXxe1WOAx6MK9z4hHSU8/1v2mrzYSYG6onNLt2qTj13hkQZk\"',"
|
| 451 | - "'items': ["
|
| 452 | + "\"kind\": \"youtube#videoCategoryListResponse\","
|
| 453 | + "\"etag\": \"\\\"tbWC5XrSXxe1WOAx6MK9z4hHSU8/1v2mrzYSYG6onNLt2qTj13hkQZk\\\"\","
|
| 454 | + "\"items\": ["
|
| 455 | "{"
|
| 456 | - "'kind': 'youtube#videoCategory',"
|
| 457 | - "'etag': '\"tbWC5XrSXxe1WOAx6MK9z4hHSU8/Xy1mB4_yLrHy_BmKmPBggty2mZQ\"',"
|
| 458 | - "'id': '1',"
|
| 459 | - "'snippet': {"
|
| 460 | - "'channelId': 'UCBR8-60-B28hp2BmDPdntcQ',"
|
| 461 | - "'title': 'Film & Animation',"
|
| 462 | - "'assignable': true"
|
| 463 | + "\"kind\": \"youtube#videoCategory\","
|
| 464 | + "\"etag\": \"\\\"tbWC5XrSXxe1WOAx6MK9z4hHSU8/Xy1mB4_yLrHy_BmKmPBggty2mZQ\\\"\","
|
| 465 | + "\"id\": \"1\","
|
| 466 | + "\"snippet\": {"
|
| 467 | + "\"channelId\": \"UCBR8-60-B28hp2BmDPdntcQ\","
|
| 468 | + "\"title\": \"Film & Animation\","
|
| 469 | + "\"assignable\": true"
|
| 470 | "}"
|
| 471 | "},"
|
| 472 | "{"
|
| 473 | - "'kind': 'youtube#videoCategory',"
|
| 474 | - "'etag': '\"tbWC5XrSXxe1WOAx6MK9z4hHSU8/UZ1oLIIz2dxIhO45ZTFR3a3NyTA\"',"
|
| 475 | - "'id': '2',"
|
| 476 | - "'snippet': {"
|
| 477 | - "'channelId': 'UCBR8-60-B28hp2BmDPdntcQ',"
|
| 478 | - "'title': 'Autos & Vehicles',"
|
| 479 | - "'assignable': true"
|
| 480 | + "\"kind\": \"youtube#videoCategory\","
|
| 481 | + "\"etag\": \"\\\"tbWC5XrSXxe1WOAx6MK9z4hHSU8/UZ1oLIIz2dxIhO45ZTFR3a3NyTA\\\"\","
|
| 482 | + "\"id\": \"2\","
|
| 483 | + "\"snippet\": {"
|
| 484 | + "\"channelId\": \"UCBR8-60-B28hp2BmDPdntcQ\","
|
| 485 | + "\"title\": \"Autos & Vehicles\","
|
| 486 | + "\"assignable\": true"
|
| 487 | "}"
|
| 488 | "}"
|
| 489 | "]"
|
| 490 | @@ -2424,8 +2424,8 @@ test_app_categories (void)
|
| 491 | /* Now parse one with less information available */
|
| 492 | categories = GDATA_APP_CATEGORIES (gdata_parsable_new_from_json (GDATA_TYPE_APP_CATEGORIES,
|
| 493 | "{"
|
| 494 | - "'kind': 'youtube#videoCategoryListResponse',"
|
| 495 | - "'items': []"
|
| 496 | + "\"kind\": \"youtube#videoCategoryListResponse\","
|
| 497 | + "\"items\": []"
|
| 498 | "}", -1, &error));
|
| 499 | g_assert_no_error (error);
|
| 500 | g_assert (GDATA_IS_APP_CATEGORIES (categories));
|
| 501 | diff --git a/gdata/tests/streams.c b/gdata/tests/streams.c
|
| 502 | index 6ba5f960..c66d7a6c 100644
|
| 503 | |
| 504 | |
| 505 | @@ -752,15 +752,15 @@ test_upload_stream_resumable_server_handler_cb (SoupServer *server, SoupMessage
|
| 506 | g_assert (message->request_body->data[message->request_body->length] == '\0');
|
| 507 | g_assert (gdata_test_compare_json_strings (message->request_body->data,
|
| 508 | "{"
|
| 509 | - "'title': 'Test title!',"
|
| 510 | - "'kind': 'youtube#video',"
|
| 511 | - "'snippet': {"
|
| 512 | - "'title': 'Test title!'"
|
| 513 | + "\"title\": \"Test title!\","
|
| 514 | + "\"kind\": \"youtube#video\","
|
| 515 | + "\"snippet\": {"
|
| 516 | + "\"title\": \"Test title!\""
|
| 517 | "},"
|
| 518 | - "'status': {"
|
| 519 | - "'privacyStatus': 'public'"
|
| 520 | + "\"status\": {"
|
| 521 | + "\"privacyStatus\": \"public\""
|
| 522 | "},"
|
| 523 | - "'recordingDetails': {}"
|
| 524 | + "\"recordingDetails\": {}"
|
| 525 | "}", TRUE) == TRUE);
|
| 526 |
|
| 527 | break;
|
| 528 | @@ -861,17 +861,17 @@ test_upload_stream_resumable_server_handler_cb (SoupServer *server, SoupMessage
|
| 529 | error: {
|
| 530 | const gchar *error_response =
|
| 531 | "{"
|
| 532 | - "'error': {"
|
| 533 | - "'errors': ["
|
| 534 | + "\"error\": {"
|
| 535 | + "\"errors\": ["
|
| 536 | "{"
|
| 537 | - "'domain': 'global',"
|
| 538 | - "'reason': 'authError',"
|
| 539 | - "'message': 'Invalid token.',"
|
| 540 | - "'location': 'Authorization: GoogleLogin'"
|
| 541 | + "\"domain\": \"global\","
|
| 542 | + "\"reason\": \"authError\","
|
| 543 | + "\"message\": \"Invalid token.\","
|
| 544 | + "\"location\": \"Authorization: GoogleLogin\""
|
| 545 | "}"
|
| 546 | "],"
|
| 547 | - "'code': 400,"
|
| 548 | - "'message': 'Invalid token.'"
|
| 549 | + "\"code\": 400,"
|
| 550 | + "\"message\": \"Invalid token.\""
|
| 551 | "}"
|
| 552 | "}";
|
| 553 |
|
| 554 | @@ -906,16 +906,16 @@ continuation: {
|
| 555 | completion: {
|
| 556 | const gchar *completion_response =
|
| 557 | "{"
|
| 558 | - "'kind': 'youtube#video',"
|
| 559 | - "'snippet': {"
|
| 560 | - "'title': 'Test title!',"
|
| 561 | - "'categoryId': '10'" /* Music */
|
| 562 | + "\"kind\": \"youtube#video\","
|
| 563 | + "\"snippet\": {"
|
| 564 | + "\"title\": \"Test title!\","
|
| 565 | + "\"categoryId\": \"10\"" /* Music */
|
| 566 | "},"
|
| 567 | - "'status': {"
|
| 568 | - "'privacyStatus': 'public'"
|
| 569 | + "\"status\": {"
|
| 570 | + "\"privacyStatus\": \"public\""
|
| 571 | "},"
|
| 572 | - "'recordingDetails': {"
|
| 573 | - "'recordingDate': '2005-10-02'"
|
| 574 | + "\"recordingDetails\": {"
|
| 575 | + "\"recordingDate\": \"2005-10-02\""
|
| 576 | "}"
|
| 577 | "}";
|
| 578 |
|
| 579 | diff --git a/gdata/tests/youtube.c b/gdata/tests/youtube.c
|
| 580 | index e4780848..fe30ec96 100644
|
| 581 | |
| 582 | |
| 583 | @@ -104,8 +104,8 @@ get_video_for_related (void)
|
| 584 |
|
| 585 | video = GDATA_YOUTUBE_VIDEO (gdata_parsable_new_from_json (GDATA_TYPE_YOUTUBE_VIDEO,
|
| 586 | "{"
|
| 587 | - "'kind': 'youtube#video',"
|
| 588 | - "'id': 'q1UPMEmCqZo'"
|
| 589 | + "\"kind\": \"youtube#video\","
|
| 590 | + "\"id\": \"q1UPMEmCqZo\""
|
| 591 | "}", -1, &error));
|
| 592 | g_assert_no_error (error);
|
| 593 | g_assert (GDATA_IS_YOUTUBE_VIDEO (video));
|
| 594 | @@ -393,312 +393,312 @@ test_parsing_app_control (void)
|
| 595 |
|
| 596 | video = GDATA_YOUTUBE_VIDEO (gdata_parsable_new_from_json (GDATA_TYPE_YOUTUBE_VIDEO,
|
| 597 | "{"
|
| 598 | - "'kind': 'youtube#video',"
|
| 599 | - "'etag': '\"tbWC5XrSXxe1WOAx6MK9z4hHSU8/X_byq2BdOVgHzCA-ScpZbTWmgfQ\"',"
|
| 600 | - "'id': 'JAagedeKdcQ',"
|
| 601 | - "'snippet': {"
|
| 602 | - "'publishedAt': '2006-05-16T14:06:37.000Z',"
|
| 603 | - "'channelId': 'UCCS6UQvicRHyn1whEUDEMUQ',"
|
| 604 | - "'title': 'Judas Priest - Painkiller',"
|
| 605 | - "'description': 'Videoclip de Judas Priest',"
|
| 606 | - "'thumbnails': {"
|
| 607 | - "'default': {"
|
| 608 | - "'url': 'https://i.ytimg.com/vi/JAagedeKdcQ/default.jpg',"
|
| 609 | - "'width': 120,"
|
| 610 | - "'height': 90"
|
| 611 | + "\"kind\": \"youtube#video\","
|
| 612 | + "\"etag\": \"\\\"tbWC5XrSXxe1WOAx6MK9z4hHSU8/X_byq2BdOVgHzCA-ScpZbTWmgfQ\\\"\","
|
| 613 | + "\"id\": \"JAagedeKdcQ\","
|
| 614 | + "\"snippet\": {"
|
| 615 | + "\"publishedAt\": \"2006-05-16T14:06:37.000Z\","
|
| 616 | + "\"channelId\": \"UCCS6UQvicRHyn1whEUDEMUQ\","
|
| 617 | + "\"title\": \"Judas Priest - Painkiller\","
|
| 618 | + "\"description\": \"Videoclip de Judas Priest\","
|
| 619 | + "\"thumbnails\": {"
|
| 620 | + "\"default\": {"
|
| 621 | + "\"url\": \"https://i.ytimg.com/vi/JAagedeKdcQ/default.jpg\","
|
| 622 | + "\"width\": 120,"
|
| 623 | + "\"height\": 90"
|
| 624 | "},"
|
| 625 | - "'medium': {"
|
| 626 | - "'url': 'https://i.ytimg.com/vi/JAagedeKdcQ/mqdefault.jpg',"
|
| 627 | - "'width': 320,"
|
| 628 | - "'height': 180"
|
| 629 | + "\"medium\": {"
|
| 630 | + "\"url\": \"https://i.ytimg.com/vi/JAagedeKdcQ/mqdefault.jpg\","
|
| 631 | + "\"width\": 320,"
|
| 632 | + "\"height\": 180"
|
| 633 | "},"
|
| 634 | - "'high': {"
|
| 635 | - "'url': 'https://i.ytimg.com/vi/JAagedeKdcQ/hqdefault.jpg',"
|
| 636 | - "'width': 480,"
|
| 637 | - "'height': 360"
|
| 638 | + "\"high\": {"
|
| 639 | + "\"url\": \"https://i.ytimg.com/vi/JAagedeKdcQ/hqdefault.jpg\","
|
| 640 | + "\"width\": 480,"
|
| 641 | + "\"height\": 360"
|
| 642 | "}"
|
| 643 | "},"
|
| 644 | - "'channelTitle': 'eluves',"
|
| 645 | - "'categoryId': '10',"
|
| 646 | - "'liveBroadcastContent': 'none',"
|
| 647 | - "'localized': {"
|
| 648 | - "'title': 'Judas Priest - Painkiller',"
|
| 649 | - "'description': 'Videoclip de Judas Priest'"
|
| 650 | + "\"channelTitle\": \"eluves\","
|
| 651 | + "\"categoryId\": \"10\","
|
| 652 | + "\"liveBroadcastContent\": \"none\","
|
| 653 | + "\"localized\": {"
|
| 654 | + "\"title\": \"Judas Priest - Painkiller\","
|
| 655 | + "\"description\": \"Videoclip de Judas Priest\""
|
| 656 | "}"
|
| 657 | "},"
|
| 658 | - "'contentDetails': {"
|
| 659 | - "'duration': 'PT6M',"
|
| 660 | - "'dimension': '2d',"
|
| 661 | - "'definition': 'sd',"
|
| 662 | - "'caption': 'false',"
|
| 663 | - "'licensedContent': false,"
|
| 664 | - "'regionRestriction': {"
|
| 665 | - "'blocked': ["
|
| 666 | - "'RU',"
|
| 667 | - "'RW',"
|
| 668 | - "'RS',"
|
| 669 | - "'RO',"
|
| 670 | - "'RE',"
|
| 671 | - "'BL',"
|
| 672 | - "'BM',"
|
| 673 | - "'BN',"
|
| 674 | - "'BO',"
|
| 675 | - "'JP',"
|
| 676 | - "'BI',"
|
| 677 | - "'BJ',"
|
| 678 | - "'BD',"
|
| 679 | - "'BE',"
|
| 680 | - "'BF',"
|
| 681 | - "'BG',"
|
| 682 | - "'YT',"
|
| 683 | - "'BB',"
|
| 684 | - "'CX',"
|
| 685 | - "'JE',"
|
| 686 | - "'BY',"
|
| 687 | - "'BZ',"
|
| 688 | - "'BT',"
|
| 689 | - "'JM',"
|
| 690 | - "'BV',"
|
| 691 | - "'BW',"
|
| 692 | - "'YE',"
|
| 693 | - "'BQ',"
|
| 694 | - "'BR',"
|
| 695 | - "'BS',"
|
| 696 | - "'IM',"
|
| 697 | - "'IL',"
|
| 698 | - "'IO',"
|
| 699 | - "'IN',"
|
| 700 | - "'IE',"
|
| 701 | - "'ID',"
|
| 702 | - "'QA',"
|
| 703 | - "'TM',"
|
| 704 | - "'IQ',"
|
| 705 | - "'IS',"
|
| 706 | - "'IR',"
|
| 707 | - "'IT',"
|
| 708 | - "'TK',"
|
| 709 | - "'AE',"
|
| 710 | - "'AD',"
|
| 711 | - "'AG',"
|
| 712 | - "'AF',"
|
| 713 | - "'AI',"
|
| 714 | - "'AM',"
|
| 715 | - "'AL',"
|
| 716 | - "'AO',"
|
| 717 | - "'AQ',"
|
| 718 | - "'AS',"
|
| 719 | - "'AR',"
|
| 720 | - "'AU',"
|
| 721 | - "'AT',"
|
| 722 | - "'AW',"
|
| 723 | - "'TG',"
|
| 724 | - "'AX',"
|
| 725 | - "'AZ',"
|
| 726 | - "'PR',"
|
| 727 | - "'HK',"
|
| 728 | - "'HN',"
|
| 729 | - "'PW',"
|
| 730 | - "'PT',"
|
| 731 | - "'HM',"
|
| 732 | - "'PY',"
|
| 733 | - "'PA',"
|
| 734 | - "'PF',"
|
| 735 | - "'PG',"
|
| 736 | - "'PE',"
|
| 737 | - "'HR',"
|
| 738 | - "'PK',"
|
| 739 | - "'PH',"
|
| 740 | - "'PN',"
|
| 741 | - "'HT',"
|
| 742 | - "'HU',"
|
| 743 | - "'OM',"
|
| 744 | - "'WS',"
|
| 745 | - "'WF',"
|
| 746 | - "'BH',"
|
| 747 | - "'KP',"
|
| 748 | - "'TT',"
|
| 749 | - "'GG',"
|
| 750 | - "'GF',"
|
| 751 | - "'GE',"
|
| 752 | - "'GD',"
|
| 753 | - "'GB',"
|
| 754 | - "'VN',"
|
| 755 | - "'VA',"
|
| 756 | - "'GM',"
|
| 757 | - "'VC',"
|
| 758 | - "'VE',"
|
| 759 | - "'GI',"
|
| 760 | - "'VG',"
|
| 761 | - "'GW',"
|
| 762 | - "'GU',"
|
| 763 | - "'GT',"
|
| 764 | - "'GS',"
|
| 765 | - "'GR',"
|
| 766 | - "'GQ',"
|
| 767 | - "'GP',"
|
| 768 | - "'VU',"
|
| 769 | - "'GY',"
|
| 770 | - "'NA',"
|
| 771 | - "'NC',"
|
| 772 | - "'NE',"
|
| 773 | - "'NF',"
|
| 774 | - "'NG',"
|
| 775 | - "'NI',"
|
| 776 | - "'NL',"
|
| 777 | - "'BA',"
|
| 778 | - "'NO',"
|
| 779 | - "'NP',"
|
| 780 | - "'NR',"
|
| 781 | - "'NU',"
|
| 782 | - "'NZ',"
|
| 783 | - "'PM',"
|
| 784 | - "'UM',"
|
| 785 | - "'TV',"
|
| 786 | - "'UG',"
|
| 787 | - "'UA',"
|
| 788 | - "'FI',"
|
| 789 | - "'FJ',"
|
| 790 | - "'FK',"
|
| 791 | - "'UY',"
|
| 792 | - "'FM',"
|
| 793 | - "'CN',"
|
| 794 | - "'UZ',"
|
| 795 | - "'US',"
|
| 796 | - "'ME',"
|
| 797 | - "'MD',"
|
| 798 | - "'MG',"
|
| 799 | - "'MF',"
|
| 800 | - "'MA',"
|
| 801 | - "'MC',"
|
| 802 | - "'VI',"
|
| 803 | - "'MM',"
|
| 804 | - "'ML',"
|
| 805 | - "'MO',"
|
| 806 | - "'FO',"
|
| 807 | - "'MH',"
|
| 808 | - "'MK',"
|
| 809 | - "'MU',"
|
| 810 | - "'MT',"
|
| 811 | - "'MW',"
|
| 812 | - "'MV',"
|
| 813 | - "'MQ',"
|
| 814 | - "'MP',"
|
| 815 | - "'MS',"
|
| 816 | - "'MR',"
|
| 817 | - "'CO',"
|
| 818 | - "'CV',"
|
| 819 | - "'MY',"
|
| 820 | - "'MX',"
|
| 821 | - "'MZ',"
|
| 822 | - "'TN',"
|
| 823 | - "'TO',"
|
| 824 | - "'TL',"
|
| 825 | - "'JO',"
|
| 826 | - "'TJ',"
|
| 827 | - "'GA',"
|
| 828 | - "'TH',"
|
| 829 | - "'TF',"
|
| 830 | - "'ET',"
|
| 831 | - "'TD',"
|
| 832 | - "'TC',"
|
| 833 | - "'ES',"
|
| 834 | - "'ER',"
|
| 835 | - "'TZ',"
|
| 836 | - "'EH',"
|
| 837 | - "'GN',"
|
| 838 | - "'EE',"
|
| 839 | - "'TW',"
|
| 840 | - "'EG',"
|
| 841 | - "'TR',"
|
| 842 | - "'CA',"
|
| 843 | - "'EC',"
|
| 844 | - "'GL',"
|
| 845 | - "'LB',"
|
| 846 | - "'LC',"
|
| 847 | - "'LA',"
|
| 848 | - "'MN',"
|
| 849 | - "'LK',"
|
| 850 | - "'LI',"
|
| 851 | - "'LV',"
|
| 852 | - "'LT',"
|
| 853 | - "'LU',"
|
| 854 | - "'LR',"
|
| 855 | - "'LS',"
|
| 856 | - "'PS',"
|
| 857 | - "'KZ',"
|
| 858 | - "'GH',"
|
| 859 | - "'LY',"
|
| 860 | - "'DZ',"
|
| 861 | - "'DO',"
|
| 862 | - "'DM',"
|
| 863 | - "'DJ',"
|
| 864 | - "'PL',"
|
| 865 | - "'DK',"
|
| 866 | - "'DE',"
|
| 867 | - "'SZ',"
|
| 868 | - "'SY',"
|
| 869 | - "'SX',"
|
| 870 | - "'SS',"
|
| 871 | - "'SR',"
|
| 872 | - "'SV',"
|
| 873 | - "'ST',"
|
| 874 | - "'SK',"
|
| 875 | - "'SJ',"
|
| 876 | - "'SI',"
|
| 877 | - "'SH',"
|
| 878 | - "'SO',"
|
| 879 | - "'SN',"
|
| 880 | - "'SM',"
|
| 881 | - "'SL',"
|
| 882 | - "'SC',"
|
| 883 | - "'SB',"
|
| 884 | - "'SA',"
|
| 885 | - "'FR',"
|
| 886 | - "'SG',"
|
| 887 | - "'SE',"
|
| 888 | - "'SD',"
|
| 889 | - "'CK',"
|
| 890 | - "'KR',"
|
| 891 | - "'CI',"
|
| 892 | - "'CH',"
|
| 893 | - "'KW',"
|
| 894 | - "'ZA',"
|
| 895 | - "'CM',"
|
| 896 | - "'CL',"
|
| 897 | - "'CC',"
|
| 898 | - "'ZM',"
|
| 899 | - "'KY',"
|
| 900 | - "'CG',"
|
| 901 | - "'CF',"
|
| 902 | - "'CD',"
|
| 903 | - "'CZ',"
|
| 904 | - "'CY',"
|
| 905 | - "'ZW',"
|
| 906 | - "'KG',"
|
| 907 | - "'CU',"
|
| 908 | - "'KE',"
|
| 909 | - "'CR',"
|
| 910 | - "'KI',"
|
| 911 | - "'KH',"
|
| 912 | - "'CW',"
|
| 913 | - "'KN',"
|
| 914 | - "'KM'"
|
| 915 | + "\"contentDetails\": {"
|
| 916 | + "\"duration\": \"PT6M\","
|
| 917 | + "\"dimension\": \"2d\","
|
| 918 | + "\"definition\": \"sd\","
|
| 919 | + "\"caption\": \"false\","
|
| 920 | + "\"licensedContent\": false,"
|
| 921 | + "\"regionRestriction\": {"
|
| 922 | + "\"blocked\": ["
|
| 923 | + "\"RU\","
|
| 924 | + "\"RW\","
|
| 925 | + "\"RS\","
|
| 926 | + "\"RO\","
|
| 927 | + "\"RE\","
|
| 928 | + "\"BL\","
|
| 929 | + "\"BM\","
|
| 930 | + "\"BN\","
|
| 931 | + "\"BO\","
|
| 932 | + "\"JP\","
|
| 933 | + "\"BI\","
|
| 934 | + "\"BJ\","
|
| 935 | + "\"BD\","
|
| 936 | + "\"BE\","
|
| 937 | + "\"BF\","
|
| 938 | + "\"BG\","
|
| 939 | + "\"YT\","
|
| 940 | + "\"BB\","
|
| 941 | + "\"CX\","
|
| 942 | + "\"JE\","
|
| 943 | + "\"BY\","
|
| 944 | + "\"BZ\","
|
| 945 | + "\"BT\","
|
| 946 | + "\"JM\","
|
| 947 | + "\"BV\","
|
| 948 | + "\"BW\","
|
| 949 | + "\"YE\","
|
| 950 | + "\"BQ\","
|
| 951 | + "\"BR\","
|
| 952 | + "\"BS\","
|
| 953 | + "\"IM\","
|
| 954 | + "\"IL\","
|
| 955 | + "\"IO\","
|
| 956 | + "\"IN\","
|
| 957 | + "\"IE\","
|
| 958 | + "\"ID\","
|
| 959 | + "\"QA\","
|
| 960 | + "\"TM\","
|
| 961 | + "\"IQ\","
|
| 962 | + "\"IS\","
|
| 963 | + "\"IR\","
|
| 964 | + "\"IT\","
|
| 965 | + "\"TK\","
|
| 966 | + "\"AE\","
|
| 967 | + "\"AD\","
|
| 968 | + "\"AG\","
|
| 969 | + "\"AF\","
|
| 970 | + "\"AI\","
|
| 971 | + "\"AM\","
|
| 972 | + "\"AL\","
|
| 973 | + "\"AO\","
|
| 974 | + "\"AQ\","
|
| 975 | + "\"AS\","
|
| 976 | + "\"AR\","
|
| 977 | + "\"AU\","
|
| 978 | + "\"AT\","
|
| 979 | + "\"AW\","
|
| 980 | + "\"TG\","
|
| 981 | + "\"AX\","
|
| 982 | + "\"AZ\","
|
| 983 | + "\"PR\","
|
| 984 | + "\"HK\","
|
| 985 | + "\"HN\","
|
| 986 | + "\"PW\","
|
| 987 | + "\"PT\","
|
| 988 | + "\"HM\","
|
| 989 | + "\"PY\","
|
| 990 | + "\"PA\","
|
| 991 | + "\"PF\","
|
| 992 | + "\"PG\","
|
| 993 | + "\"PE\","
|
| 994 | + "\"HR\","
|
| 995 | + "\"PK\","
|
| 996 | + "\"PH\","
|
| 997 | + "\"PN\","
|
| 998 | + "\"HT\","
|
| 999 | + "\"HU\","
|
| 1000 | + "\"OM\","
|
| 1001 | + "\"WS\","
|
| 1002 | + "\"WF\","
|
| 1003 | + "\"BH\","
|
| 1004 | + "\"KP\","
|
| 1005 | + "\"TT\","
|
| 1006 | + "\"GG\","
|
| 1007 | + "\"GF\","
|
| 1008 | + "\"GE\","
|
| 1009 | + "\"GD\","
|
| 1010 | + "\"GB\","
|
| 1011 | + "\"VN\","
|
| 1012 | + "\"VA\","
|
| 1013 | + "\"GM\","
|
| 1014 | + "\"VC\","
|
| 1015 | + "\"VE\","
|
| 1016 | + "\"GI\","
|
| 1017 | + "\"VG\","
|
| 1018 | + "\"GW\","
|
| 1019 | + "\"GU\","
|
| 1020 | + "\"GT\","
|
| 1021 | + "\"GS\","
|
| 1022 | + "\"GR\","
|
| 1023 | + "\"GQ\","
|
| 1024 | + "\"GP\","
|
| 1025 | + "\"VU\","
|
| 1026 | + "\"GY\","
|
| 1027 | + "\"NA\","
|
| 1028 | + "\"NC\","
|
| 1029 | + "\"NE\","
|
| 1030 | + "\"NF\","
|
| 1031 | + "\"NG\","
|
| 1032 | + "\"NI\","
|
| 1033 | + "\"NL\","
|
| 1034 | + "\"BA\","
|
| 1035 | + "\"NO\","
|
| 1036 | + "\"NP\","
|
| 1037 | + "\"NR\","
|
| 1038 | + "\"NU\","
|
| 1039 | + "\"NZ\","
|
| 1040 | + "\"PM\","
|
| 1041 | + "\"UM\","
|
| 1042 | + "\"TV\","
|
| 1043 | + "\"UG\","
|
| 1044 | + "\"UA\","
|
| 1045 | + "\"FI\","
|
| 1046 | + "\"FJ\","
|
| 1047 | + "\"FK\","
|
| 1048 | + "\"UY\","
|
| 1049 | + "\"FM\","
|
| 1050 | + "\"CN\","
|
| 1051 | + "\"UZ\","
|
| 1052 | + "\"US\","
|
| 1053 | + "\"ME\","
|
| 1054 | + "\"MD\","
|
| 1055 | + "\"MG\","
|
| 1056 | + "\"MF\","
|
| 1057 | + "\"MA\","
|
| 1058 | + "\"MC\","
|
| 1059 | + "\"VI\","
|
| 1060 | + "\"MM\","
|
| 1061 | + "\"ML\","
|
| 1062 | + "\"MO\","
|
| 1063 | + "\"FO\","
|
| 1064 | + "\"MH\","
|
| 1065 | + "\"MK\","
|
| 1066 | + "\"MU\","
|
| 1067 | + "\"MT\","
|
| 1068 | + "\"MW\","
|
| 1069 | + "\"MV\","
|
| 1070 | + "\"MQ\","
|
| 1071 | + "\"MP\","
|
| 1072 | + "\"MS\","
|
| 1073 | + "\"MR\","
|
| 1074 | + "\"CO\","
|
| 1075 | + "\"CV\","
|
| 1076 | + "\"MY\","
|
| 1077 | + "\"MX\","
|
| 1078 | + "\"MZ\","
|
| 1079 | + "\"TN\","
|
| 1080 | + "\"TO\","
|
| 1081 | + "\"TL\","
|
| 1082 | + "\"JO\","
|
| 1083 | + "\"TJ\","
|
| 1084 | + "\"GA\","
|
| 1085 | + "\"TH\","
|
| 1086 | + "\"TF\","
|
| 1087 | + "\"ET\","
|
| 1088 | + "\"TD\","
|
| 1089 | + "\"TC\","
|
| 1090 | + "\"ES\","
|
| 1091 | + "\"ER\","
|
| 1092 | + "\"TZ\","
|
| 1093 | + "\"EH\","
|
| 1094 | + "\"GN\","
|
| 1095 | + "\"EE\","
|
| 1096 | + "\"TW\","
|
| 1097 | + "\"EG\","
|
| 1098 | + "\"TR\","
|
| 1099 | + "\"CA\","
|
| 1100 | + "\"EC\","
|
| 1101 | + "\"GL\","
|
| 1102 | + "\"LB\","
|
| 1103 | + "\"LC\","
|
| 1104 | + "\"LA\","
|
| 1105 | + "\"MN\","
|
| 1106 | + "\"LK\","
|
| 1107 | + "\"LI\","
|
| 1108 | + "\"LV\","
|
| 1109 | + "\"LT\","
|
| 1110 | + "\"LU\","
|
| 1111 | + "\"LR\","
|
| 1112 | + "\"LS\","
|
| 1113 | + "\"PS\","
|
| 1114 | + "\"KZ\","
|
| 1115 | + "\"GH\","
|
| 1116 | + "\"LY\","
|
| 1117 | + "\"DZ\","
|
| 1118 | + "\"DO\","
|
| 1119 | + "\"DM\","
|
| 1120 | + "\"DJ\","
|
| 1121 | + "\"PL\","
|
| 1122 | + "\"DK\","
|
| 1123 | + "\"DE\","
|
| 1124 | + "\"SZ\","
|
| 1125 | + "\"SY\","
|
| 1126 | + "\"SX\","
|
| 1127 | + "\"SS\","
|
| 1128 | + "\"SR\","
|
| 1129 | + "\"SV\","
|
| 1130 | + "\"ST\","
|
| 1131 | + "\"SK\","
|
| 1132 | + "\"SJ\","
|
| 1133 | + "\"SI\","
|
| 1134 | + "\"SH\","
|
| 1135 | + "\"SO\","
|
| 1136 | + "\"SN\","
|
| 1137 | + "\"SM\","
|
| 1138 | + "\"SL\","
|
| 1139 | + "\"SC\","
|
| 1140 | + "\"SB\","
|
| 1141 | + "\"SA\","
|
| 1142 | + "\"FR\","
|
| 1143 | + "\"SG\","
|
| 1144 | + "\"SE\","
|
| 1145 | + "\"SD\","
|
| 1146 | + "\"CK\","
|
| 1147 | + "\"KR\","
|
| 1148 | + "\"CI\","
|
| 1149 | + "\"CH\","
|
| 1150 | + "\"KW\","
|
| 1151 | + "\"ZA\","
|
| 1152 | + "\"CM\","
|
| 1153 | + "\"CL\","
|
| 1154 | + "\"CC\","
|
| 1155 | + "\"ZM\","
|
| 1156 | + "\"KY\","
|
| 1157 | + "\"CG\","
|
| 1158 | + "\"CF\","
|
| 1159 | + "\"CD\","
|
| 1160 | + "\"CZ\","
|
| 1161 | + "\"CY\","
|
| 1162 | + "\"ZW\","
|
| 1163 | + "\"KG\","
|
| 1164 | + "\"CU\","
|
| 1165 | + "\"KE\","
|
| 1166 | + "\"CR\","
|
| 1167 | + "\"KI\","
|
| 1168 | + "\"KH\","
|
| 1169 | + "\"CW\","
|
| 1170 | + "\"KN\","
|
| 1171 | + "\"KM\""
|
| 1172 | "]"
|
| 1173 | "}"
|
| 1174 | "},"
|
| 1175 | - "'status': {"
|
| 1176 | - "'uploadStatus': 'processed',"
|
| 1177 | - "'privacyStatus': 'private',"
|
| 1178 | - "'license': 'youtube',"
|
| 1179 | - "'embeddable': true,"
|
| 1180 | - "'publicStatsViewable': true"
|
| 1181 | + "\"status\": {"
|
| 1182 | + "\"uploadStatus\": \"processed\","
|
| 1183 | + "\"privacyStatus\": \"private\","
|
| 1184 | + "\"license\": \"youtube\","
|
| 1185 | + "\"embeddable\": true,"
|
| 1186 | + "\"publicStatsViewable\": true"
|
| 1187 | "},"
|
| 1188 | - "'statistics': {"
|
| 1189 | - "'viewCount': '4369107',"
|
| 1190 | - "'likeCount': '13619',"
|
| 1191 | - "'dislikeCount': '440',"
|
| 1192 | - "'favoriteCount': '0',"
|
| 1193 | - "'commentCount': '11181'"
|
| 1194 | + "\"statistics\": {"
|
| 1195 | + "\"viewCount\": \"4369107\","
|
| 1196 | + "\"likeCount\": \"13619\","
|
| 1197 | + "\"dislikeCount\": \"440\","
|
| 1198 | + "\"favoriteCount\": \"0\","
|
| 1199 | + "\"commentCount\": \"11181\""
|
| 1200 | "}"
|
| 1201 | "}", -1, &error));
|
| 1202 | g_assert_no_error (error);
|
| 1203 | @@ -726,24 +726,24 @@ test_parsing_yt_recorded (void)
|
| 1204 |
|
| 1205 | video = GDATA_YOUTUBE_VIDEO (gdata_parsable_new_from_json (GDATA_TYPE_YOUTUBE_VIDEO,
|
| 1206 | "{"
|
| 1207 | - "'kind': 'youtube#video',"
|
| 1208 | - "'etag': '\"tbWC5XrSXxe1WOAx6MK9z4hHSU8/X_byq2BdOVgHzCA-ScpZbTWmgfQ\"',"
|
| 1209 | - "'id': 'JAagedeKdcQ',"
|
| 1210 | - "'snippet': {"
|
| 1211 | - "'publishedAt': '2006-05-16T14:06:37.000Z',"
|
| 1212 | - "'channelId': 'UCCS6UQvicRHyn1whEUDEMUQ',"
|
| 1213 | - "'title': 'Judas Priest - Painkiller',"
|
| 1214 | - "'description': 'Videoclip de Judas Priest',"
|
| 1215 | - "'channelTitle': 'eluves',"
|
| 1216 | - "'categoryId': '10',"
|
| 1217 | - "'liveBroadcastContent': 'none',"
|
| 1218 | - "'localized': {"
|
| 1219 | - "'title': 'Judas Priest - Painkiller',"
|
| 1220 | - "'description': 'Videoclip de Judas Priest'"
|
| 1221 | + "\"kind\": \"youtube#video\","
|
| 1222 | + "\"etag\": \"\\\"tbWC5XrSXxe1WOAx6MK9z4hHSU8/X_byq2BdOVgHzCA-ScpZbTWmgfQ\\\"\","
|
| 1223 | + "\"id\": \"JAagedeKdcQ\","
|
| 1224 | + "\"snippet\": {"
|
| 1225 | + "\"publishedAt\": \"2006-05-16T14:06:37.000Z\","
|
| 1226 | + "\"channelId\": \"UCCS6UQvicRHyn1whEUDEMUQ\","
|
| 1227 | + "\"title\": \"Judas Priest - Painkiller\","
|
| 1228 | + "\"description\": \"Videoclip de Judas Priest\","
|
| 1229 | + "\"channelTitle\": \"eluves\","
|
| 1230 | + "\"categoryId\": \"10\","
|
| 1231 | + "\"liveBroadcastContent\": \"none\","
|
| 1232 | + "\"localized\": {"
|
| 1233 | + "\"title\": \"Judas Priest - Painkiller\","
|
| 1234 | + "\"description\": \"Videoclip de Judas Priest\""
|
| 1235 | "}"
|
| 1236 | "},"
|
| 1237 | - "'recordingDetails': {"
|
| 1238 | - "'recordingDate': '2003-08-03'"
|
| 1239 | + "\"recordingDetails\": {"
|
| 1240 | + "\"recordingDate\": \"2003-08-03\""
|
| 1241 | "}"
|
| 1242 | "}", -1, &error));
|
| 1243 | g_assert_no_error (error);
|
| 1244 | @@ -761,22 +761,22 @@ test_parsing_yt_recorded (void)
|
| 1245 | /* Check the XML */
|
| 1246 | gdata_test_assert_json (video,
|
| 1247 | "{"
|
| 1248 | - "'kind': 'youtube#video',"
|
| 1249 | - "'etag': '\"tbWC5XrSXxe1WOAx6MK9z4hHSU8/X_byq2BdOVgHzCA-ScpZbTWmgfQ\"',"
|
| 1250 | - "'id': 'JAagedeKdcQ',"
|
| 1251 | - "'selfLink': 'https://www.googleapis.com/youtube/v3/videos?id=JAagedeKdcQ',"
|
| 1252 | - "'title': 'Judas Priest - Painkiller',"
|
| 1253 | - "'description': 'Videoclip de Judas Priest',"
|
| 1254 | - "'snippet': {"
|
| 1255 | - "'title': 'Judas Priest - Painkiller',"
|
| 1256 | - "'description': 'Videoclip de Judas Priest',"
|
| 1257 | - "'categoryId': '10'"
|
| 1258 | + "\"kind\": \"youtube#video\","
|
| 1259 | + "\"etag\": \"\\\"tbWC5XrSXxe1WOAx6MK9z4hHSU8/X_byq2BdOVgHzCA-ScpZbTWmgfQ\\\"\","
|
| 1260 | + "\"id\": \"JAagedeKdcQ\","
|
| 1261 | + "\"selfLink\": \"https://www.googleapis.com/youtube/v3/videos?id=JAagedeKdcQ\","
|
| 1262 | + "\"title\": \"Judas Priest - Painkiller\","
|
| 1263 | + "\"description\": \"Videoclip de Judas Priest\","
|
| 1264 | + "\"snippet\": {"
|
| 1265 | + "\"title\": \"Judas Priest - Painkiller\","
|
| 1266 | + "\"description\": \"Videoclip de Judas Priest\","
|
| 1267 | + "\"categoryId\": \"10\""
|
| 1268 | "},"
|
| 1269 | - "'status': {"
|
| 1270 | - "'privacyStatus': 'public'"
|
| 1271 | + "\"status\": {"
|
| 1272 | + "\"privacyStatus\": \"public\""
|
| 1273 | "},"
|
| 1274 | - "'recordingDetails': {"
|
| 1275 | - "'recordingDate': '2005-10-02'"
|
| 1276 | + "\"recordingDetails\": {"
|
| 1277 | + "\"recordingDate\": \"2005-10-02\""
|
| 1278 | "}"
|
| 1279 | "}");
|
| 1280 |
|
| 1281 | @@ -793,11 +793,11 @@ test_parsing_yt_access_control (void)
|
| 1282 |
|
| 1283 | video = GDATA_YOUTUBE_VIDEO (gdata_parsable_new_from_json (GDATA_TYPE_YOUTUBE_VIDEO,
|
| 1284 | "{"
|
| 1285 | - "'kind': 'youtube#video',"
|
| 1286 | - "'id': 'JAagedeKdcQ',"
|
| 1287 | - "'status': {"
|
| 1288 | - "'privacyStatus': 'public',"
|
| 1289 | - "'embeddable': false"
|
| 1290 | + "\"kind\": \"youtube#video\","
|
| 1291 | + "\"id\": \"JAagedeKdcQ\","
|
| 1292 | + "\"status\": {"
|
| 1293 | + "\"privacyStatus\": \"public\","
|
| 1294 | + "\"embeddable\": false"
|
| 1295 | "}"
|
| 1296 | "}", -1, &error));
|
| 1297 | g_assert_no_error (error);
|
| 1298 | @@ -820,16 +820,16 @@ test_parsing_yt_access_control (void)
|
| 1299 | /* Check the JSON */
|
| 1300 | gdata_test_assert_json (video,
|
| 1301 | "{"
|
| 1302 | - "'kind': 'youtube#video',"
|
| 1303 | - "'id': 'JAagedeKdcQ',"
|
| 1304 | - "'selfLink': 'https://www.googleapis.com/youtube/v3/videos?id=JAagedeKdcQ',"
|
| 1305 | - "'title': null,"
|
| 1306 | - "'snippet': {},"
|
| 1307 | - "'status': {"
|
| 1308 | - "'privacyStatus': 'unlisted',"
|
| 1309 | - "'embeddable': true"
|
| 1310 | + "\"kind\": \"youtube#video\","
|
| 1311 | + "\"id\": \"JAagedeKdcQ\","
|
| 1312 | + "\"selfLink\": \"https://www.googleapis.com/youtube/v3/videos?id=JAagedeKdcQ\","
|
| 1313 | + "\"title\": null,"
|
| 1314 | + "\"snippet\": {},"
|
| 1315 | + "\"status\": {"
|
| 1316 | + "\"privacyStatus\": \"unlisted\","
|
| 1317 | + "\"embeddable\": true"
|
| 1318 | "},"
|
| 1319 | - "'recordingDetails': {}"
|
| 1320 | + "\"recordingDetails\": {}"
|
| 1321 | "}");
|
| 1322 |
|
| 1323 | g_object_unref (video);
|
| 1324 | @@ -898,12 +898,12 @@ test_parsing_georss_where (void)
|
| 1325 |
|
| 1326 | video = GDATA_YOUTUBE_VIDEO (gdata_parsable_new_from_json (GDATA_TYPE_YOUTUBE_VIDEO,
|
| 1327 | "{"
|
| 1328 | - "'kind': 'youtube#video',"
|
| 1329 | - "'id': 'JAagedeKdcQ',"
|
| 1330 | - "'recordingDetails': {"
|
| 1331 | - "'location': {"
|
| 1332 | - "'latitude': 41.14556884765625,"
|
| 1333 | - "'longitude': -8.63525390625"
|
| 1334 | + "\"kind\": \"youtube#video\","
|
| 1335 | + "\"id\": \"JAagedeKdcQ\","
|
| 1336 | + "\"recordingDetails\": {"
|
| 1337 | + "\"location\": {"
|
| 1338 | + "\"latitude\": 41.14556884765625,"
|
| 1339 | + "\"longitude\": -8.63525390625"
|
| 1340 | "}"
|
| 1341 | "}"
|
| 1342 | "}", -1, &error));
|
| 1343 | @@ -930,18 +930,18 @@ test_parsing_georss_where (void)
|
| 1344 | /* Check the JSON */
|
| 1345 | gdata_test_assert_json (video,
|
| 1346 | "{"
|
| 1347 | - "'kind': 'youtube#video',"
|
| 1348 | - "'id': 'JAagedeKdcQ',"
|
| 1349 | - "'selfLink': 'https://www.googleapis.com/youtube/v3/videos?id=JAagedeKdcQ',"
|
| 1350 | - "'title': null,"
|
| 1351 | - "'snippet': {},"
|
| 1352 | - "'status': {"
|
| 1353 | - "'privacyStatus': 'public'"
|
| 1354 | + "\"kind\": \"youtube#video\","
|
| 1355 | + "\"id\": \"JAagedeKdcQ\","
|
| 1356 | + "\"selfLink\": \"https://www.googleapis.com/youtube/v3/videos?id=JAagedeKdcQ\","
|
| 1357 | + "\"title\": null,"
|
| 1358 | + "\"snippet\": {},"
|
| 1359 | + "\"status\": {"
|
| 1360 | + "\"privacyStatus\": \"public\""
|
| 1361 | "},"
|
| 1362 | - "'recordingDetails': {"
|
| 1363 | - "'location': {"
|
| 1364 | - "'latitude': 5.5,"
|
| 1365 | - "'longitude': 6.5"
|
| 1366 | + "\"recordingDetails\": {"
|
| 1367 | + "\"location\": {"
|
| 1368 | + "\"latitude\": 5.5,"
|
| 1369 | + "\"longitude\": 6.5"
|
| 1370 | "}"
|
| 1371 | "}"
|
| 1372 | "}");
|
| 1373 | @@ -956,15 +956,15 @@ test_parsing_georss_where (void)
|
| 1374 | /* Check the JSON */
|
| 1375 | gdata_test_assert_json (video,
|
| 1376 | "{"
|
| 1377 | - "'kind': 'youtube#video',"
|
| 1378 | - "'id': 'JAagedeKdcQ',"
|
| 1379 | - "'selfLink': 'https://www.googleapis.com/youtube/v3/videos?id=JAagedeKdcQ',"
|
| 1380 | - "'title': null,"
|
| 1381 | - "'snippet': {},"
|
| 1382 | - "'status': {"
|
| 1383 | - "'privacyStatus': 'public'"
|
| 1384 | + "\"kind\": \"youtube#video\","
|
| 1385 | + "\"id\": \"JAagedeKdcQ\","
|
| 1386 | + "\"selfLink\": \"https://www.googleapis.com/youtube/v3/videos?id=JAagedeKdcQ\","
|
| 1387 | + "\"title\": null,"
|
| 1388 | + "\"snippet\": {},"
|
| 1389 | + "\"status\": {"
|
| 1390 | + "\"privacyStatus\": \"public\""
|
| 1391 | "},"
|
| 1392 | - "'recordingDetails': {}"
|
| 1393 | + "\"recordingDetails\": {}"
|
| 1394 | "}");
|
| 1395 |
|
| 1396 | g_object_unref (video);
|
| 1397 | @@ -979,12 +979,12 @@ test_parsing_ratings (void)
|
| 1398 | /* Parse all ratings */
|
| 1399 | video = GDATA_YOUTUBE_VIDEO (gdata_parsable_new_from_json (GDATA_TYPE_YOUTUBE_VIDEO,
|
| 1400 | "{"
|
| 1401 | - "'kind': 'youtube#video',"
|
| 1402 | - "'id': 'JAagedeKdcQ',"
|
| 1403 | - "'contentDetails': {"
|
| 1404 | - "'contentRating': {"
|
| 1405 | - "'mpaaRating': 'mpaaPg',"
|
| 1406 | - "'tvpgRating': 'tvpgPg'"
|
| 1407 | + "\"kind\": \"youtube#video\","
|
| 1408 | + "\"id\": \"JAagedeKdcQ\","
|
| 1409 | + "\"contentDetails\": {"
|
| 1410 | + "\"contentRating\": {"
|
| 1411 | + "\"mpaaRating\": \"mpaaPg\","
|
| 1412 | + "\"tvpgRating\": \"tvpgPg\""
|
| 1413 | "}"
|
| 1414 | "}"
|
| 1415 | "}", -1, &error));
|
| 1416 | @@ -1003,11 +1003,11 @@ test_parsing_ratings (void)
|
| 1417 | /* Parse a video with one rating missing and see what happens */
|
| 1418 | video = GDATA_YOUTUBE_VIDEO (gdata_parsable_new_from_json (GDATA_TYPE_YOUTUBE_VIDEO,
|
| 1419 | "{"
|
| 1420 | - "'kind': 'youtube#video',"
|
| 1421 | - "'id': 'JAagedeKdcQ',"
|
| 1422 | - "'contentDetails': {"
|
| 1423 | - "'contentRating': {"
|
| 1424 | - "'tvpgRating': 'tvpgY7Fv'"
|
| 1425 | + "\"kind\": \"youtube#video\","
|
| 1426 | + "\"id\": \"JAagedeKdcQ\","
|
| 1427 | + "\"contentDetails\": {"
|
| 1428 | + "\"contentRating\": {"
|
| 1429 | + "\"tvpgRating\": \"tvpgY7Fv\""
|
| 1430 | "}"
|
| 1431 | "}"
|
| 1432 | "}", -1, &error));
|
| 1433 | @@ -1041,21 +1041,21 @@ test_video_escaping (void)
|
| 1434 | /* Check the outputted JSON is escaped properly */
|
| 1435 | gdata_test_assert_json (video,
|
| 1436 | "{"
|
| 1437 | - "'kind': 'youtube#video',"
|
| 1438 | - "'title': null,"
|
| 1439 | - "'description': \"Description & 'stuff'.\","
|
| 1440 | - "'snippet': {"
|
| 1441 | - "'description': \"Description & 'stuff'.\","
|
| 1442 | - "'tags': ["
|
| 1443 | - "'<keyword1>',"
|
| 1444 | - "'keyword2 & stuff, things'"
|
| 1445 | + "\"kind\": \"youtube#video\","
|
| 1446 | + "\"title\": null,"
|
| 1447 | + "\"description\": \"Description & 'stuff'.\","
|
| 1448 | + "\"snippet\": {"
|
| 1449 | + "\"description\": \"Description & 'stuff'.\","
|
| 1450 | + "\"tags\": ["
|
| 1451 | + "\"<keyword1>\","
|
| 1452 | + "\"keyword2 & stuff, things\""
|
| 1453 | "]"
|
| 1454 | "},"
|
| 1455 | - "'status': {"
|
| 1456 | - "'privacyStatus': 'public'"
|
| 1457 | + "\"status\": {"
|
| 1458 | + "\"privacyStatus\": \"public\""
|
| 1459 | "},"
|
| 1460 | - "'recordingDetails': {"
|
| 1461 | - "'locationDescription': \"\\\"Here\\\" & 'there'\""
|
| 1462 | + "\"recordingDetails\": {"
|
| 1463 | + "\"locationDescription\": \"\\\"Here\\\" & 'there'\""
|
| 1464 | "}"
|
| 1465 | "}");
|
| 1466 | g_object_unref (video);
|
| 1467 | @@ -1081,13 +1081,13 @@ test_video_location (void)
|
| 1468 | /* Check the outputted JSON is escaped properly */
|
| 1469 | gdata_test_assert_json (video,
|
| 1470 | "{"
|
| 1471 | - "'title': null,"
|
| 1472 | - "'kind': 'youtube#video',"
|
| 1473 | - "'snippet': {},"
|
| 1474 | - "'status': {"
|
| 1475 | - "'privacyStatus': 'public'"
|
| 1476 | + "\"title\": null,"
|
| 1477 | + "\"kind\": \"youtube#video\","
|
| 1478 | + "\"snippet\": {},"
|
| 1479 | + "\"status\": {"
|
| 1480 | + "\"privacyStatus\": \"public\""
|
| 1481 | "},"
|
| 1482 | - "'recordingDetails': {}"
|
| 1483 | + "\"recordingDetails\": {}"
|
| 1484 | "}");
|
| 1485 |
|
| 1486 | g_object_unref (video);
|
| 1487 | @@ -1107,13 +1107,13 @@ test_comment_get_json (void)
|
| 1488 | /* Check the outputted JSON is OK */
|
| 1489 | gdata_test_assert_json (comment_,
|
| 1490 | "{"
|
| 1491 | - "'kind': 'youtube#commentThread',"
|
| 1492 | - "'snippet' : {"
|
| 1493 | - "'topLevelComment': {"
|
| 1494 | - "'kind': 'youtube#comment',"
|
| 1495 | - "'snippet': {"
|
| 1496 | - "'textOriginal': \"This is a comment with <markup> & 'stüff'.\","
|
| 1497 | - "'parentId': 'http://example.com/?foo=bar&baz=shizzle'"
|
| 1498 | + "\"kind\": \"youtube#commentThread\","
|
| 1499 | + "\"snippet\" : {"
|
| 1500 | + "\"topLevelComment\": {"
|
| 1501 | + "\"kind\": \"youtube#comment\","
|
| 1502 | + "\"snippet\": {"
|
| 1503 | + "\"textOriginal\": \"This is a comment with <markup> & 'stüff'.\","
|
| 1504 | + "\"parentId\": \"http://example.com/?foo=bar&baz=shizzle\""
|
| 1505 | "}"
|
| 1506 | "}"
|
| 1507 | "}"
|
| 1508 | --
|
| 1509 | GitLab
|