chromium/base/json/json_writer.cc

// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "base/json/json_writer.h"

#include <stdint.h>

#include <cmath>
#include <limits>
#include <string_view>

#include "base/json/string_escape.h"
#include "base/logging.h"
#include "base/numerics/safe_conversions.h"
#include "base/strings/string_number_conversions.h"
#include "base/values.h"
#include "build/build_config.h"

namespace base {

#if BUILDFLAG(IS_WIN)
const char kPrettyPrintLineEnding[] = "\r\n";
#else
const char kPrettyPrintLineEnding[] =;
#endif

// static
bool JSONWriter::Write(ValueView node, std::string* json, size_t max_depth) {}

// static
bool JSONWriter::WriteWithOptions(ValueView node,
                                  int options,
                                  std::string* json,
                                  size_t max_depth) {}

JSONWriter::JSONWriter(int options, std::string* json, size_t max_depth)
    :{}

bool JSONWriter::BuildJSONString(absl::monostate node, size_t depth) {}

bool JSONWriter::BuildJSONString(bool node, size_t depth) {}

bool JSONWriter::BuildJSONString(int node, size_t depth) {}

bool JSONWriter::BuildJSONString(double node, size_t depth) {}

bool JSONWriter::BuildJSONString(std::string_view node, size_t depth) {}

bool JSONWriter::BuildJSONString(const Value::BlobStorage& node, size_t depth) {}

bool JSONWriter::BuildJSONString(const Value::Dict& node, size_t depth) {}

bool JSONWriter::BuildJSONString(const Value::List& node, size_t depth) {}

void JSONWriter::IndentLine(size_t depth) {}

std::optional<std::string> WriteJson(ValueView node, size_t max_depth) {}

std::optional<std::string> WriteJsonWithOptions(ValueView node,
                                                uint32_t options,
                                                size_t max_depth) {}

}  // namespace base