MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / ReadJsonValue

Function ReadJsonValue

tensorflow/core/platform/cloud/oauth_client.cc:51–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49 "urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Ajwt-bearer";
50
51Status ReadJsonValue(const Json::Value& json, const string& name,
52 Json::Value* value) {
53 if (!value) {
54 return errors::FailedPrecondition("'value' cannot be nullptr.");
55 }
56 *value = json.get(name, Json::Value::null);
57 if (*value == Json::Value::null) {
58 return errors::FailedPrecondition(
59 strings::StrCat("Couldn't read a JSON value '", name, "'."));
60 }
61 return Status::OK();
62}
63
64Status ReadJsonString(const Json::Value& json, const string& name,
65 string* value) {

Callers 2

ReadJsonStringFunction · 0.85
ReadJsonIntFunction · 0.85

Calls 3

FailedPreconditionFunction · 0.85
StrCatFunction · 0.50
getMethod · 0.45

Tested by

no test coverage detected