Hyperspace::KeyValueJsonSerializer Class Reference

An implementation of KeyValueSerializer for JSON. More...

#include <HyperspaceCore/KeyValueJsonSerializer>

Inheritance diagram for Hyperspace::KeyValueJsonSerializer:

Public Member Functions

 KeyValueJsonSerializer ()
 Default constructor. More...
 
QVariantMap deserialize (const QByteArray &data) Q_DECL_OVERRIDE Q_DECL_FINAL
 
QByteArray serialize (const QVariantMap &data) Q_DECL_OVERRIDE Q_DECL_FINAL
 
- Public Member Functions inherited from Hyperspace::KeyValueSerializer
QList< QByteArray > contentTypes () const
 
QList< QByteArray > dataTypes () const
 

Additional Inherited Members

- Protected Member Functions inherited from Hyperspace::KeyValueSerializer
 KeyValueSerializer (const QList< QByteArray > &contentType, const QList< QByteArray > &dataTypes)
 Creates a new Key/Value Serializer. More...
 

Detailed Description

An implementation of KeyValueSerializer for JSON.

This implementation handles all JSON content types and JSON data types.

See also
Hyperspace::KeyValueSerializer

Constructor & Destructor Documentation

Hyperspace::KeyValueJsonSerializer::KeyValueJsonSerializer ( )

Default constructor.

Member Function Documentation

QVariantMap Hyperspace::KeyValueJsonSerializer::deserialize ( const QByteArray &  data)
virtual

Reimplement this function to implement deserialization for a Key/Value payload.

data A Key/Value payload

Returns
A VariantMap representing the deserialized data

Implements Hyperspace::KeyValueSerializer.

QByteArray Hyperspace::KeyValueJsonSerializer::serialize ( const QVariantMap &  data)
virtual

Reimplement this function to implement serialization for a Key/Value map.

data A Key/Value map

Returns
A ByteArray representing the serialized data

Implements Hyperspace::KeyValueSerializer.