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

Function ReadJsonString

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

Source from the content-addressed store, hash-verified

62}
63
64Status ReadJsonString(const Json::Value& json, const string& name,
65 string* value) {
66 Json::Value json_value;
67 TF_RETURN_IF_ERROR(ReadJsonValue(json, name, &json_value));
68 if (!json_value.isString()) {
69 return errors::FailedPrecondition(
70 strings::StrCat("JSON value '", name, "' is not string."));
71 }
72 *value = json_value.asString();
73 return Status::OK();
74}
75
76Status ReadJsonInt(const Json::Value& json, const string& name, int64* value) {
77 Json::Value json_value;

Callers 3

ParseOAuthResponseMethod · 0.85

Calls 3

ReadJsonValueFunction · 0.85
FailedPreconditionFunction · 0.85
StrCatFunction · 0.50

Tested by

no test coverage detected