MCPcopy Create free account
hub / github.com/Snapchat/Valdi / parseFromJSON

Method parseFromJSON

valdi_protobuf/src/valdi_protobuf/Message.cpp:275–285  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

273}
274
275Ref<Message> Message::parseFromJSON(std::string_view json,
276 const google::protobuf::Descriptor* descriptor,
277 ExceptionTracker& exceptionTracker) {
278 auto out = makeShared<Message>(descriptor, nullptr);
279
280 if (!out->decodeFromJSON(json, exceptionTracker)) {
281 return nullptr;
282 }
283
284 return out;
285}
286
287Result<Ref<Message>> Message::parseFromJSON(std::string_view json, const google::protobuf::Descriptor* descriptor) {
288 SimpleExceptionTracker exceptionTracker;

Callers

nothing calls this directly

Calls 2

decodeFromJSONMethod · 0.80
toResultMethod · 0.80

Tested by

no test coverage detected