Poco::Remoting::JSON

class Serializer

Library: Remoting/JSON
Package: JSON
Header: Poco/Remoting/JSON/Serializer.h

Description

The Serializer implementation for the JSON Transport.

Inheritance

Direct Base Classes: Poco::Remoting::Serializer

All Base Classes: Poco::Remoting::Serializer

Member Summary

Member Functions: pushAttribute, resetId, resetImpl, serialize, serializeComplexTypeEnd, serializeComplexTypeStart, serializeError, serializeNullElement, serializeReplyEnd, serializeReplyStart, serializeRequestEnd, serializeRequestStart, serializeVectorBegin, serializeVectorEnd, setOutputStreamImpl

Inherited Functions: getProperty, hasProperty, popProperty, pushAttribute, pushProperty, reset, resetImpl, serialize, serializeComplexTypeEnd, serializeComplexTypeStart, serializeError, serializeNullElement, serializeReplyEnd, serializeReplyStart, serializeRequestEnd, serializeRequestStart, serializeVectorBegin, serializeVectorEnd, setOutputStream, setOutputStreamImpl

Enumerations

State

ST_MESSAGE

ST_OBJECT

ST_OBJECT_FIRST

ST_ARRAY

ST_ARRAY_FIRST

Constructors

Serializer

Serializer();

Creates the Serializer.

Destructor

~Serializer virtual

~Serializer();

Destroys the Serializer.

Member Functions

pushAttribute virtual inline

void pushAttribute(
    const std::string & ns,
    const std::string & attrName
);

See also: Poco::Remoting::Serializer::pushAttribute()

resetId inline

void resetId(
    int newId = 0
);

serialize virtual inline

void serialize(
    const std::string & name,
    Poco::Int8 val
);

Serializes an Int8.

See also: Poco::Remoting::Serializer::serialize()

serialize virtual

void serialize(
    const std::string & name,
    Poco::UInt8 val
);

Serializes an UInt8.

See also: Poco::Remoting::Serializer::serialize()

serialize virtual

void serialize(
    const std::string & name,
    Poco::Int16 val
);

Serializes an Int16.

See also: Poco::Remoting::Serializer::serialize()

serialize virtual

void serialize(
    const std::string & name,
    Poco::UInt16 val
);

Serializes an UInt16.

See also: Poco::Remoting::Serializer::serialize()

serialize virtual

void serialize(
    const std::string & name,
    Poco::Int32 val
);

Serializes an Int32.

See also: Poco::Remoting::Serializer::serialize()

serialize virtual

void serialize(
    const std::string & name,
    Poco::UInt32 val
);

Serializes an UInt32.

See also: Poco::Remoting::Serializer::serialize()

serialize virtual

void serialize(
    const std::string & name,
    long val
);

Serializes a long.

See also: Poco::Remoting::Serializer::serialize()

serialize virtual

void serialize(
    const std::string & name,
    unsigned long val
);

Serializes an unsigned long.

See also: Poco::Remoting::Serializer::serialize()

serialize virtual

void serialize(
    const std::string & name,
    float val
);

Serializes a float.

See also: Poco::Remoting::Serializer::serialize()

serialize virtual

void serialize(
    const std::string & name,
    double val
);

Serializes a double.

See also: Poco::Remoting::Serializer::serialize()

serialize virtual

void serialize(
    const std::string & name,
    bool val
);

Serializes a boolean.

See also: Poco::Remoting::Serializer::serialize()

serialize virtual

void serialize(
    const std::string & name,
    char val
);

Serializes a single character.

See also: Poco::Remoting::Serializer::serialize()

serialize virtual

void serialize(
    const std::string & name,
    const char * pVal
);

Serializes a const char ptr.

See also: Poco::Remoting::Serializer::serialize()

serialize virtual

void serialize(
    const std::string & name,
    const std::string & val
);

Serializes a string.

See also: Poco::Remoting::Serializer::serialize()

serialize virtual

void serialize(
    const std::string & name,
    const std::vector < char > & val
);

Serializes a byte vector.

See also: Poco::Remoting::Serializer::serialize()

serializeComplexTypeEnd virtual

void serializeComplexTypeEnd(
    const std::string & name
);

Invoked after all members of a complex data type were serialized.

See also: Poco::Remoting::Serializer::serializeComplexTypeEnd()

serializeComplexTypeStart virtual

void serializeComplexTypeStart(
    const std::string & name
);

Invoked before a complex data type is serialized.

See also: Poco::Remoting::Serializer::serializeComplexTypeStart()

serializeError virtual

void serializeError(
    std::ostream & out,
    const std::string & methodName,
    Poco::Exception & e
);

Serializes an exception.

See also: Poco::Remoting::Serializer::serializeError()

serializeNullElement virtual

void serializeNullElement(
    const std::string & name
);

Serializes a null element.

See also: Poco::Remoting::Serializer::serializeNullElement()

serializeReplyEnd virtual

void serializeReplyEnd(
    const std::string & methodName
);

Indicates the end of method serialization.

See also: Poco::Remoting::Serializer::serializeReplyEnd()

serializeReplyStart virtual

void serializeReplyStart(
    const std::string & methodName
);

Indicates the begin of method serialization reply.

See also: Poco::Remoting::Serializer::serializeReplyStart()

serializeRequestEnd virtual

void serializeRequestEnd(
    const std::string & methodName
);

Indicates the end of method serialization.

See also: Poco::Remoting::Serializer::serializeRequestEnd()

serializeRequestStart virtual

void serializeRequestStart(
    const std::string & methodName
);

Indicates the begin of method serialization.

See also: Poco::Remoting::Serializer::serializeRequestStart()

serializeVectorBegin virtual

void serializeVectorBegin(
    const std::string & name,
    Poco::UInt32 numElems
);

Called before the first element of a vector is serialized.

See also: Poco::Remoting::Serializer::serializeVectorBegin()

serializeVectorEnd virtual

void serializeVectorEnd(
    const std::string & name
);

Called after the last element of a vector was serialized.

See also: Poco::Remoting::Serializer::serializeVectorEnd()

resetImpl protected virtual

void resetImpl();

See also: Poco::Remoting::Serializer::resetImpl()

setOutputStreamImpl protected virtual

void setOutputStreamImpl(
    std::ostream & out
);

See also: Poco::Remoting::Serializer::setOutputStreamImpl()

Variables

JSON_CODE static

static const std::string JSON_CODE;

JSON_ERROR static

static const std::string JSON_ERROR;

JSON_FALSE static

static const std::string JSON_FALSE;

JSON_ID static

static const std::string JSON_ID;

JSON_JSONRPC static

static const std::string JSON_JSONRPC;

JSON_MESSAGE static

static const std::string JSON_MESSAGE;

JSON_METHOD static

static const std::string JSON_METHOD;

JSON_NULL static

static const std::string JSON_NULL;

JSON_PARAMS static

static const std::string JSON_PARAMS;

JSON_RESULT static

static const std::string JSON_RESULT;

JSON_TRUE static

static const std::string JSON_TRUE;

JSON_VERSION static

static const std::string JSON_VERSION;