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

Function _parse_object

libraries/AP_JSON/AP_JSON.cpp:545–563  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

543}
544
545template <typename Context, typename Iter> bool _parse_object(Context &ctx, input<Iter> &in)
546{
547 if (!ctx.parse_object_start()) {
548 return false;
549 }
550 if (in.expect('}')) {
551 return true;
552 }
553 do {
554 std::string key;
555 if (!in.expect('"') || !_parse_string(key, in) || !in.expect(':')) {
556 return false;
557 }
558 if (!ctx.parse_object_item(in, key)) {
559 return false;
560 }
561 } while (in.expect(','));
562 return in.expect('}');
563}
564
565template <typename Iter> std::string _parse_number(input<Iter> &in)
566{

Callers 1

_parseFunction · 0.85

Calls 4

_parse_stringFunction · 0.85
parse_object_startMethod · 0.80
parse_object_itemMethod · 0.80
expectMethod · 0.45

Tested by

no test coverage detected