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

Function GetStringValue

tensorflow/core/platform/cloud/gcs_file_system.cc:242–253  ·  view source on GitHub ↗

Reads a string JSON value with the given name from a parent JSON value.

Source from the content-addressed store, hash-verified

240
241/// Reads a string JSON value with the given name from a parent JSON value.
242Status GetStringValue(const Json::Value& parent, const char* name,
243 string* result) {
244 Json::Value result_value;
245 TF_RETURN_IF_ERROR(GetValue(parent, name, &result_value));
246 if (!result_value.isString()) {
247 return errors::Internal(
248 "The field '", name,
249 "' in the JSON response was expected to be a string.");
250 }
251 *result = result_value.asString();
252 return Status::OK();
253}
254
255/// Reads a long JSON value with the given name from a parent JSON value.
256Status GetInt64Value(const Json::Value& parent, const char* name,

Callers 3

UncachedStatForObjectMethod · 0.85
GetBucketLocationMethod · 0.85
GetChildrenBoundedMethod · 0.85

Calls 2

InternalFunction · 0.85
GetValueFunction · 0.70

Tested by

no test coverage detected