Reads a boolean JSON value with the given name from a parent JSON value.
| 272 | |
| 273 | /// Reads a boolean JSON value with the given name from a parent JSON value. |
| 274 | Status GetBoolValue(const Json::Value& parent, const char* name, bool* result) { |
| 275 | Json::Value result_value; |
| 276 | TF_RETURN_IF_ERROR(GetValue(parent, name, &result_value)); |
| 277 | if (!result_value.isBool()) { |
| 278 | return errors::Internal( |
| 279 | "The field '", name, |
| 280 | "' in the JSON response was expected to be a boolean."); |
| 281 | } |
| 282 | *result = result_value.asBool(); |
| 283 | return Status::OK(); |
| 284 | } |
| 285 | |
| 286 | /// A GCS-based implementation of a random access file with an LRU block cache. |
| 287 | class GcsRandomAccessFile : public RandomAccessFile { |
no test coverage detected