| 320 | |
| 321 | |
| 322 | JSON::Pos JSON::skipArray() const |
| 323 | { |
| 324 | if (!isArray()) |
| 325 | throw JSONException("JSON: expected ["); |
| 326 | Pos pos = ptr_begin; |
| 327 | ++pos; |
| 328 | checkPos(pos); |
| 329 | if (*pos == ']') |
| 330 | return ++pos; |
| 331 | |
| 332 | while (true) |
| 333 | { |
| 334 | pos = JSON(pos, ptr_end, level + 1).skipElement(); |
| 335 | |
| 336 | checkPos(pos); |
| 337 | |
| 338 | switch (*pos) |
| 339 | { |
| 340 | case ',': |
| 341 | ++pos; |
| 342 | break; |
| 343 | case ']': |
| 344 | return ++pos; |
| 345 | default: |
| 346 | throw JSONException(std::string("JSON: expected one of ',]', got ") + *pos); |
| 347 | } |
| 348 | } |
| 349 | } |
| 350 | |
| 351 | |
| 352 | JSON::Pos JSON::skipObject() const |
nothing calls this directly
no test coverage detected