Poco::JSON

class ParseHandler

File Information

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

Description

ParseHandler is the default handler for the JSON Parser.

This handler will construct an Object or Array based on the handlers called by the Parser.

Inheritance

Direct Base Classes: Handler

All Base Classes: Handler

Member Summary

Member Functions: asVar, endArray, endObject, key, null, reset, startArray, startObject, value

Inherited Functions: asStruct, asVar, endArray, endObject, key, null, reset, startArray, startObject, value

Constructors

ParseHandler

ParseHandler(
    bool preserveObjectOrder = false
);

Creates the ParseHandler.

If preserveObjectOrder is true, the order of properties inside objects is preserved. Otherwise, items will be sorted by keys.

Destructor

~ParseHandler virtual

virtual ~ParseHandler();

Destroys the ParseHandler.

Member Functions

asVar inline

Dynamic::Var asVar() const;

Returns the result of the parser (an object or an array).

endArray virtual

void endArray();

Handles a ']'; the array is closed.

endObject virtual

void endObject();

Handles a '}'; the object is closed.

key virtual

void key(
    const std::string & k
);

A key is read

null virtual inline

virtual void null();

A null value is read.

reset virtual

virtual void reset();

Resets the handler state.

startArray virtual

void startArray();

Handles a '['; a new array is started.

startObject virtual

void startObject();

Handles a '{'; a new object is started.

value virtual inline

virtual void value(
    int v
);

An integer value is read

value virtual

virtual void value(
    unsigned v
);

An unsigned value is read. This will only be triggered if the value cannot fit into a signed int.

value virtual

virtual void value(
    Int64 v
);

A 64-bit integer value is read

value virtual

virtual void value(
    UInt64 v
);

An unsigned 64-bit integer value is read. This will only be triggered if the value cannot fit into a signed 64-bit integer.

value virtual

virtual void value(
    const std::string & s
);

A string value is read.

value virtual

virtual void value(
    double d
);

A double value is read.

value virtual

virtual void value(
    bool b
);

A boolean value is read.

Securely control IoT edge devices from anywhere   Connect a Device