MCPcopy Create free account
hub / github.com/ArduPilot/ardupilot / _parse_array

Function _parse_array

libraries/AP_JSON/AP_JSON.cpp:527–543  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

525}
526
527template <typename Context, typename Iter> bool _parse_array(Context &ctx, input<Iter> &in)
528{
529 if (!ctx.parse_array_start()) {
530 return false;
531 }
532 size_t idx = 0;
533 if (in.expect(']')) {
534 return ctx.parse_array_stop(idx);
535 }
536 do {
537 if (!ctx.parse_array_item(in, idx)) {
538 return false;
539 }
540 idx++;
541 } while (in.expect(','));
542 return in.expect(']') && ctx.parse_array_stop(idx);
543}
544
545template <typename Context, typename Iter> bool _parse_object(Context &ctx, input<Iter> &in)
546{

Callers 1

_parseFunction · 0.85

Calls 4

parse_array_startMethod · 0.80
parse_array_stopMethod · 0.80
parse_array_itemMethod · 0.80
expectMethod · 0.45

Tested by

no test coverage detected