| 216 | } |
| 217 | |
| 218 | Status ParseJson(StringPiece json, Json::Value* result) { |
| 219 | Json::Reader reader; |
| 220 | if (!reader.parse(json.data(), json.data() + json.size(), *result)) { |
| 221 | return errors::Internal("Couldn't parse JSON response from GCS."); |
| 222 | } |
| 223 | return Status::OK(); |
| 224 | } |
| 225 | |
| 226 | Status ParseJson(const std::vector<char>& json, Json::Value* result) { |
| 227 | return ParseJson(StringPiece{json.data(), json.size()}, result); |
no test coverage detected