class JSONParser

Library: RemotingNG/JSONRPC
Package: JSONParser
Header: Poco/RemotingNG/JSONRPC/JSONParser.h


A simple parser for JSON.

Member Summary

Member Functions: getMaxDepth, isEOF, isWhitespace, parse, parseArray, parseObject, parseScalar, parseString, parseUnicode, parseValue, setMaxDepth, skipWhitespace



    std::istream & istr

Creates a JSONParser for parsing the given stream.




Destroys the JSONParser.

Member Functions

getMaxDepth inline

std::size_t getMaxDepth() const;

Returns the maximum allowed depth of the JSON document.


JSValue::Ptr parse();

Reads a JSValue from the stream.

setMaxDepth inline

void setMaxDepth(
    std::size_t maxDepth

Sets the maximum allowed depth of the JSON document.

isEOF protected static inline

static bool isEOF(
    int ch

isWhitespace protected static inline

static bool isWhitespace(
    int ch

parseArray protected

int parseArray(
    int ch,
    JSValue::Ptr & pArray

parseObject protected

int parseObject(
    int ch,
    JSValue::Ptr & pObject

parseScalar protected

int parseScalar(
    int ch,
    JSValue::Ptr & pScalar

parseString protected

int parseString(
    int ch,
    std::string & str

parseUnicode protected

int parseUnicode(
    int ch,
    std::string & str

parseValue protected

int parseValue(
    int ch,
    JSValue::Ptr & pValue

skipWhitespace protected

int skipWhitespace(
    int ch


MAX_DEPTH static

constexpr static std::size_t MAX_DEPTH = 50;

Securely control IoT edge devices from anywhere   Connect a Device