1
0
Fork 0
mirror of https://github.com/thoughtbot/capybara-webkit synced 2023-03-27 23:22:28 -04:00
capybara-webkit/src/JsonSerializer.h

21 lines
460 B
C
Raw Normal View History

2012-12-29 18:47:12 -05:00
#include <QObject>
#include <QVariantList>
class JsonSerializer : public QObject {
Q_OBJECT
public:
JsonSerializer(QObject *parent = 0);
QByteArray serialize(const QVariant &object);
2012-12-29 18:47:12 -05:00
private:
void addVariant(const QVariant &object);
void addString(const QString &string);
void addArray(const QVariantList &list);
void addMap(const QVariantMap &map);
QByteArray sanitizeString(QString string);
2012-12-29 18:47:12 -05:00
QByteArray m_buffer;
2012-12-29 18:47:12 -05:00
};