#include <memory>
#include <optional>
#include <string>
#include <string_view>
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/json/json_file_value_serializer.h"
#include "base/json/json_reader.h"
#include "base/json/json_string_value_serializer.h"
#include "base/json/json_writer.h"
#include "base/path_service.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/values.h"
#include "build/build_config.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace base {
namespace {
const char kProperJSON[] = …;
const char kProperJSONWithCommas[] = …;
const char kProperJSONPadded[] = …;
const char kWinLineEnds[] = …;
const char kLinuxLineEnds[] = …;
void CheckJSONIsStillTheSame(const Value& value) { … }
void ValidateJsonList(const std::string& json) { … }
TEST(JSONValueDeserializerTest, ReadProperJSONFromString) { … }
TEST(JSONValueDeserializerTest, ReadProperJSONFromStringPiece) { … }
TEST(JSONValueDeserializerTest, ReadJSONWithTrailingCommasFromString) { … }
TEST(JSONValueDeserializerTest, ReadProperJSONFromFile) { … }
TEST(JSONValueDeserializerTest, ReadJSONWithCommasFromFile) { … }
TEST(JSONValueDeserializerTest, AllowTrailingComma) { … }
TEST(JSONValueSerializerTest, Roundtrip) { … }
TEST(JSONValueSerializerTest, StringEscape) { … }
TEST(JSONValueSerializerTest, UnicodeStrings) { … }
TEST(JSONValueSerializerTest, HexStrings) { … }
TEST(JSONValueSerializerTest, JSONReaderComments) { … }
class JSONFileValueSerializerTest : public testing::Test { … };
TEST_F(JSONFileValueSerializerTest, Roundtrip) { … }
TEST_F(JSONFileValueSerializerTest, RoundtripNested) { … }
TEST_F(JSONFileValueSerializerTest, NoWhitespace) { … }
}
}