#include <google/protobuf/util/internal/json_stream_parser.h>
#include <algorithm>
#include <cctype>
#include <cmath>
#include <memory>
#include <stack>
#include <string>
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/stubs/logging.h>
#include <google/protobuf/stubs/strutil.h>
#include <google/protobuf/stubs/status.h>
#include <google/protobuf/util/internal/object_writer.h>
#include <google/protobuf/util/internal/json_escaping.h>
namespace google {
namespace protobuf {
namespace util {
namespace converter {
static const int kUnicodeEscapedLength = …;
static const int kDefaultMaxRecursionDepth = …;
static const StringPiece kKeywordTrue = …;
static const StringPiece kKeywordFalse = …;
static const StringPiece kKeywordNull = …;
inline bool IsLetter(char c) { … }
inline bool IsAlphanumeric(char c) { … }
inline bool IsKeySeparator(char c) { … }
inline void ReplaceInvalidCodePoints(StringPiece str,
const std::string& replacement,
std::string* dst) { … }
static bool ConsumeKey(StringPiece* input, StringPiece* key) { … }
static bool ConsumeKeyPermissive(StringPiece* input,
StringPiece* key) { … }
static bool MatchKey(StringPiece input) { … }
JsonStreamParser::JsonStreamParser(ObjectWriter* ow)
: … { … }
JsonStreamParser::~JsonStreamParser() { … }
util::Status JsonStreamParser::Parse(StringPiece json) { … }
util::Status JsonStreamParser::FinishParse() { … }
util::Status JsonStreamParser::ParseChunk(StringPiece chunk) { … }
bool JsonStreamParser::IsInputAllWhiteSpaces(TokenType type) { … }
util::Status JsonStreamParser::RunParser() { … }
util::Status JsonStreamParser::ParseValue(TokenType type) { … }
util::Status JsonStreamParser::ParseString() { … }
util::Status JsonStreamParser::ParseStringHelper() { … }
util::Status JsonStreamParser::ParseUnicodeEscape() { … }
util::Status JsonStreamParser::ParseNumber() { … }
util::Status JsonStreamParser::ParseDoubleHelper(const std::string& number,
NumberResult* result) { … }
util::Status JsonStreamParser::ParseNumberHelper(NumberResult* result) { … }
util::Status JsonStreamParser::HandleBeginObject() { … }
util::Status JsonStreamParser::ParseObjectMid(TokenType type) { … }
util::Status JsonStreamParser::ParseEntry(TokenType type) { … }
util::Status JsonStreamParser::ParseEntryMid(TokenType type) { … }
util::Status JsonStreamParser::HandleBeginArray() { … }
util::Status JsonStreamParser::ParseArrayValue(TokenType type) { … }
util::Status JsonStreamParser::ParseArrayMid(TokenType type) { … }
util::Status JsonStreamParser::ParseTrue() { … }
util::Status JsonStreamParser::ParseFalse() { … }
util::Status JsonStreamParser::ParseNull() { … }
util::Status JsonStreamParser::ParseEmptyNull() { … }
bool JsonStreamParser::IsEmptyNullAllowed(TokenType type) { … }
util::Status JsonStreamParser::ReportFailure(StringPiece message,
ParseErrorType parse_code) { … }
util::Status JsonStreamParser::ReportUnknown(StringPiece message,
ParseErrorType parse_code) { … }
util::Status JsonStreamParser::IncrementRecursionDepth(
StringPiece key) const { … }
void JsonStreamParser::SkipWhitespace() { … }
void JsonStreamParser::Advance() { … }
util::Status JsonStreamParser::ParseKey() { … }
JsonStreamParser::TokenType JsonStreamParser::GetNextTokenType() { … }
}
}
}
}