Skip to content

CJsonPacketParser

Takashiro edited this page Aug 20, 2015 · 2 revisions
Cardirector Documentation: Network

CJsonPacketParser

The CJsonPacketParser inherits CAbstractPacketParser and defines a packet parser that converts structural data, i.e, CPacket into JSON string representations and vice versa.

Public Functions

CJsonPacketParser();
virtual ~CJsonPacketParser();
virtual CPacket parse(const QByteArray &data);
virtual QByteArray parse(const CPacket &packet);

CJsonPacketParser();

Create a new JSON packet parser.

virtual ~CJsonPacketParser();

Destroys a JSON packet parser.

virtual CPacket parse(const QByteArray &data) = 0;

Converts a JSON string representation into a CPacket.

virtual QByteArray parse(const CPacket &packet) = 0;

Converts a CPacket into a JSON string representation.