Poco::JSON

class ParserImpl

File Information

Library: JSON
Package: JSON
Header: Poco/JSON/ParserImpl.h

Inheritance

Known Derived Classes: Parser

Member Summary

Member Functions: asVarImpl, getAllowCommentsImpl, getAllowNullByteImpl, getDepthImpl, getHandlerImpl, parseImpl, resetImpl, resultImpl, setAllowCommentsImpl, setAllowNullByteImpl, setDepthImpl, setHandlerImpl

Constructors

ParserImpl protected

ParserImpl(
    const Handler::Ptr & pHandler = new ParseHandler
);

Creates JSON ParserImpl, using the given Handler and buffer size.

Destructor

~ParserImpl protected virtual

virtual ~ParserImpl();

Destroys JSON ParserImpl.

Member Functions

asVarImpl protected inline

Dynamic::Var asVarImpl() const;

Returns the result of parsing;

getAllowCommentsImpl protected inline

bool getAllowCommentsImpl() const;

Returns true if comments are allowed, false otherwise.

By default, comments are not allowed.

getAllowNullByteImpl protected inline

bool getAllowNullByteImpl() const;

Returns true if null byte is allowed, false otherwise.

By default, null bytes are allowed.

getDepthImpl protected inline

std::size_t getDepthImpl() const;

Returns the allowed JSON depth.

getHandlerImpl protected inline

const Handler::Ptr & getHandlerImpl();

Returns the Handler.

parseImpl protected

Dynamic::Var parseImpl(
    const std::string & json
);

Parses JSON from a string.

parseImpl protected

Dynamic::Var parseImpl(
    std::istream & in
);

Parses JSON from an input stream.

resetImpl protected inline

void resetImpl();

Resets the parser.

resultImpl protected inline

Dynamic::Var resultImpl() const;

Returns the result of parsing as Dynamic::Var;

setAllowCommentsImpl protected inline

void setAllowCommentsImpl(
    bool comments
);

Allow or disallow comments. By default, comments are not allowed.

setAllowNullByteImpl protected inline

void setAllowNullByteImpl(
    bool nullByte
);

Allow or disallow null byte in strings.

By default, null byte is allowed.

setDepthImpl protected inline

void setDepthImpl(
    std::size_t depth
);

Sets the allowed JSON depth.

setHandlerImpl protected inline

void setHandlerImpl(
    const Handler::Ptr & pHandler
);

Set the Handler.

Variables

JSON_DEFAULT_DEPTH protected static

static const std::size_t JSON_DEFAULT_DEPTH = 128;

Securely control IoT edge devices from anywhere   Connect a Device