chromium/third_party/grpc/src/src/core/lib/json/json_reader.cc

//
// Copyright 2015-2016 gRPC authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

#include <grpc/support/port_platform.h>

#include <inttypes.h>
#include <stdlib.h>

#include <algorithm>
#include <initializer_list>
#include <map>
#include <string>
#include <utility>
#include <vector>

#include "absl/base/attributes.h"
#include "absl/status/status.h"
#include "absl/status/statusor.h"
#include "absl/strings/str_cat.h"
#include "absl/strings/str_format.h"
#include "absl/strings/str_join.h"
#include "absl/strings/string_view.h"

#include <grpc/support/log.h>

#include "src/core/lib/json/json.h"

#define GRPC_JSON_MAX_DEPTH
#define GRPC_JSON_MAX_ERRORS

namespace grpc_core {

namespace {

class JsonReader {};

bool JsonReader::StringAddChar(uint32_t c) {}

bool JsonReader::StringAddUtf32(uint32_t c) {}

uint32_t JsonReader::ReadChar() {}

Json* JsonReader::CreateAndLinkValue() {}

bool JsonReader::StartContainer(Json::Type type) {}

void JsonReader::EndContainer() {}

void JsonReader::SetKey() {}

void JsonReader::SetString() {}

bool JsonReader::SetNumber() {}

void JsonReader::SetTrue() {}

void JsonReader::SetFalse() {}

void JsonReader::SetNull() {}

bool JsonReader::IsComplete() {}

// Call this function to start parsing the input. It will return the following:
//    . GRPC_JSON_DONE if the input got eof, and the parsing finished
//      successfully.
//    . GRPC_JSON_PARSE_ERROR if the input was somehow invalid.
//    . GRPC_JSON_INTERNAL_ERROR if the parser somehow ended into an invalid
//      internal state.
//
JsonReader::Status JsonReader::Run() {}

absl::StatusOr<Json> JsonReader::Parse(absl::string_view input) {}

}  // namespace

absl::StatusOr<Json> Json::Parse(absl::string_view json_str) {}

}  // namespace grpc_core