File Information
Library: RemotingNG/REST
Package: JSONParser
Header: Poco/RemotingNG/REST/JSONParser.h
Description
A simple parser for JSON.
Member Summary
Member Functions: getMaxDepth, isEOF, isWhitespace, parse, parseArray, parseObject, parseScalar, parseString, parseUnicode, parseValue, setMaxDepth, skipWhitespace
Constructors
JSONParser
JSONParser(
std::istream & istr
);
Creates a JSONParser for parsing the given stream.
Destructor
~JSONParser
~JSONParser();
Destroys the JSONParser.
Member Functions
getMaxDepth
std::size_t getMaxDepth() const;
Returns the maximum allowed depth of the JSON document.
parse
JSValue::Ptr parse();
Reads a JSValue from the stream.
setMaxDepth
void setMaxDepth(
std::size_t maxDepth
);
Sets the maximum allowed depth of the JSON document.
isEOF
static bool isEOF(
int ch
);
isWhitespace
static bool isWhitespace(
int ch
);
parseArray
int parseArray(
int ch,
JSValue::Ptr & pArray
);
parseObject
int parseObject(
int ch,
JSValue::Ptr & pObject
);
parseScalar
int parseScalar(
int ch,
JSValue::Ptr & pScalar
);
parseString
int parseString(
int ch,
std::string & str
);
parseUnicode
int parseUnicode(
int ch,
std::string & str
);
parseValue
int parseValue(
int ch,
JSValue::Ptr & pValue
);
skipWhitespace
int skipWhitespace(
int ch
);
Variables
MAX_DEPTH
constexpr static std::size_t MAX_DEPTH = 50;