MCPcopy Create free account
hub / github.com/cel-expr/cel-cpp / StructDebugString

Method StructDebugString

internal/json.cc:1702–1719  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1700 }
1701
1702 void StructDebugString(const google::protobuf::MessageLite& message) {
1703 const int size = accessor_->FieldsSize(message);
1704 std::string key_scratch;
1705 well_known_types::StringValue key;
1706 const google::protobuf::MessageLite* absl_nonnull value;
1707 auto iterator = accessor_->IterateFields(message);
1708 output_->push_back('{');
1709 for (int i = 0; i < size; ++i) {
1710 if (i > 0) {
1711 output_->append(", ");
1712 }
1713 std::tie(key, value) = iterator.Next(key_scratch);
1714 output_->append(JsonStringDebugString(key));
1715 output_->append(": ");
1716 ValueDebugString(*value);
1717 }
1718 output_->push_back('}');
1719 }
1720
1721 private:
1722 const JsonAccessor* absl_nonnull const accessor_;

Callers 1

JsonMapDebugStringFunction · 0.80

Calls 4

JsonStringDebugStringFunction · 0.85
FieldsSizeMethod · 0.45
IterateFieldsMethod · 0.45
NextMethod · 0.45

Tested by

no test coverage detected