#if !defined(JSON_IS_AMALGAMATION)
#include "json_tool.h"
#include <json/assertions.h>
#include <json/reader.h>
#include <json/value.h>
#endif
#include <algorithm>
#include <cassert>
#include <cstring>
#include <iostream>
#include <istream>
#include <limits>
#include <memory>
#include <set>
#include <sstream>
#include <utility>
#include <cstdio>
#if __cplusplus >= 201103L
#if !defined(sscanf)
#define sscanf …
#endif
#endif
#if defined(_MSC_VER)
#if !defined(_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES)
#define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES …
#endif
#endif
#if defined(_MSC_VER)
#pragma warning(disable : 4996)
#endif
#if !defined(JSONCPP_DEPRECATED_STACK_LIMIT)
#define JSONCPP_DEPRECATED_STACK_LIMIT …
#endif
static size_t const stackLimit_g = …;
namespace Json {
#if __cplusplus >= 201103L || (defined(_CPPLIB_VER) && _CPPLIB_VER >= 520)
CharReaderPtr;
#else
using CharReaderPtr = std::auto_ptr<CharReader>;
#endif
Features::Features() = default;
Features Features::all() { … }
Features Features::strictMode() { … }
bool Reader::containsNewLine(Reader::Location begin, Reader::Location end) { … }
Reader::Reader() : … { … }
Reader::Reader(const Features& features) : … { … }
bool Reader::parse(const std::string& document, Value& root,
bool collectComments) { … }
bool Reader::parse(std::istream& is, Value& root, bool collectComments) { … }
bool Reader::parse(const char* beginDoc, const char* endDoc, Value& root,
bool collectComments) { … }
bool Reader::readValue() { … }
void Reader::skipCommentTokens(Token& token) { … }
bool Reader::readToken(Token& token) { … }
void Reader::skipSpaces() { … }
bool Reader::match(const Char* pattern, int patternLength) { … }
bool Reader::readComment() { … }
String Reader::normalizeEOL(Reader::Location begin, Reader::Location end) { … }
void Reader::addComment(Location begin, Location end,
CommentPlacement placement) { … }
bool Reader::readCStyleComment() { … }
bool Reader::readCppStyleComment() { … }
void Reader::readNumber() { … }
bool Reader::readString() { … }
bool Reader::readObject(Token& token) { … }
bool Reader::readArray(Token& token) { … }
bool Reader::decodeNumber(Token& token) { … }
bool Reader::decodeNumber(Token& token, Value& decoded) { … }
bool Reader::decodeDouble(Token& token) { … }
bool Reader::decodeDouble(Token& token, Value& decoded) { … }
bool Reader::decodeString(Token& token) { … }
bool Reader::decodeString(Token& token, String& decoded) { … }
bool Reader::decodeUnicodeCodePoint(Token& token, Location& current,
Location end, unsigned int& unicode) { … }
bool Reader::decodeUnicodeEscapeSequence(Token& token, Location& current,
Location end,
unsigned int& ret_unicode) { … }
bool Reader::addError(const String& message, Token& token, Location extra) { … }
bool Reader::recoverFromError(TokenType skipUntilToken) { … }
bool Reader::addErrorAndRecover(const String& message, Token& token,
TokenType skipUntilToken) { … }
Value& Reader::currentValue() { … }
Reader::Char Reader::getNextChar() { … }
void Reader::getLocationLineAndColumn(Location location, int& line,
int& column) const { … }
String Reader::getLocationLineAndColumn(Location location) const { … }
String Reader::getFormatedErrorMessages() const { … }
String Reader::getFormattedErrorMessages() const { … }
std::vector<Reader::StructuredError> Reader::getStructuredErrors() const { … }
bool Reader::pushError(const Value& value, const String& message) { … }
bool Reader::pushError(const Value& value, const String& message,
const Value& extra) { … }
bool Reader::good() const { … }
class OurFeatures { … };
OurFeatures OurFeatures::all() { … }
class OurReader { … };
bool OurReader::containsNewLine(OurReader::Location begin,
OurReader::Location end) { … }
OurReader::OurReader(OurFeatures const& features) : … { … }
bool OurReader::parse(const char* beginDoc, const char* endDoc, Value& root,
bool collectComments) { … }
bool OurReader::readValue() { … }
void OurReader::skipCommentTokens(Token& token) { … }
bool OurReader::readToken(Token& token) { … }
void OurReader::skipSpaces() { … }
void OurReader::skipBom(bool skipBom) { … }
bool OurReader::match(const Char* pattern, int patternLength) { … }
bool OurReader::readComment() { … }
String OurReader::normalizeEOL(OurReader::Location begin,
OurReader::Location end) { … }
void OurReader::addComment(Location begin, Location end,
CommentPlacement placement) { … }
bool OurReader::readCStyleComment(bool* containsNewLineResult) { … }
bool OurReader::readCppStyleComment() { … }
bool OurReader::readNumber(bool checkInf) { … }
bool OurReader::readString() { … }
bool OurReader::readStringSingleQuote() { … }
bool OurReader::readObject(Token& token) { … }
bool OurReader::readArray(Token& token) { … }
bool OurReader::decodeNumber(Token& token) { … }
bool OurReader::decodeNumber(Token& token, Value& decoded) { … }
bool OurReader::decodeDouble(Token& token) { … }
bool OurReader::decodeDouble(Token& token, Value& decoded) { … }
bool OurReader::decodeString(Token& token) { … }
bool OurReader::decodeString(Token& token, String& decoded) { … }
bool OurReader::decodeUnicodeCodePoint(Token& token, Location& current,
Location end, unsigned int& unicode) { … }
bool OurReader::decodeUnicodeEscapeSequence(Token& token, Location& current,
Location end,
unsigned int& ret_unicode) { … }
bool OurReader::addError(const String& message, Token& token, Location extra) { … }
bool OurReader::recoverFromError(TokenType skipUntilToken) { … }
bool OurReader::addErrorAndRecover(const String& message, Token& token,
TokenType skipUntilToken) { … }
Value& OurReader::currentValue() { … }
OurReader::Char OurReader::getNextChar() { … }
void OurReader::getLocationLineAndColumn(Location location, int& line,
int& column) const { … }
String OurReader::getLocationLineAndColumn(Location location) const { … }
String OurReader::getFormattedErrorMessages() const { … }
std::vector<OurReader::StructuredError> OurReader::getStructuredErrors() const { … }
class OurCharReader : public CharReader { … };
CharReaderBuilder::CharReaderBuilder() { … }
CharReaderBuilder::~CharReaderBuilder() = default;
CharReader* CharReaderBuilder::newCharReader() const { … }
bool CharReaderBuilder::validate(Json::Value* invalid) const { … }
Value& CharReaderBuilder::operator[](const String& key) { … }
void CharReaderBuilder::strictMode(Json::Value* settings) { … }
void CharReaderBuilder::setDefaults(Json::Value* settings) { … }
bool parseFromStream(CharReader::Factory const& fact, IStream& sin, Value* root,
String* errs) { … }
IStream& operator>>(IStream& sin, Value& root) { … }
}