parser_util.h 808 B

123456789101112131415161718192021222324252627
  1. // Copyright 2021 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef GOOGLE_APIS_COMMON_PARSER_UTIL_H_
  5. #define GOOGLE_APIS_COMMON_PARSER_UTIL_H_
  6. #include <string>
  7. #include "base/values.h"
  8. namespace google_apis {
  9. // Common JSON names
  10. constexpr char kApiResponseKindKey[] = "kind";
  11. constexpr char kApiResponseIdKey[] = "id";
  12. constexpr char kApiResponseETagKey[] = "etag";
  13. constexpr char kApiResponseItemsKey[] = "items";
  14. constexpr char kApiResponseNameKey[] = "name";
  15. // Checks if the JSON is expected kind.
  16. bool IsResourceKindExpected(const base::Value& value,
  17. const std::string& expected_kind);
  18. } // namespace google_apis
  19. #endif // GOOGLE_APIS_COMMON_PARSER_UTIL_H_