29#include <QJsonDocument>
45 *
this <<
"]" << Qt::endl;
47 m_nextIsValue =
false;
53 *
this <<
"}" << Qt::endl;
55 m_nextIsValue =
false;
63 *
this << Qt::endl <<
"[";
71 *
this << Qt::endl <<
"{";
79 doc.setObject(QCborValue(cbor_map).toJsonValue().toObject());
81 *
this << doc.toJson();
88 doc.setArray(QCborValue(cbor_array).toJsonValue().toArray());
90 *
this << doc.toJson();
99 *
this <<
"\"" << key <<
"\":";
101 m_nextIsValue =
true;
107 *
this <<
"\"" << value <<
"\"";
108 m_nextIsValue =
false;
114 *
this <<
"[\"" << str_list.join(
"\", \"") <<
"\"]" << Qt::endl;
120 *
this <<
"," << Qt::endl;
void appendValue(const QString &value)
void writeCborArray(const QCborArray &cbor_array)
JsonStreamWriter(QIODevice *device)
void writeArray(QStringList &str_list)
void appendKey(const QString &key)
virtual ~JsonStreamWriter()
void writeCborMap(const QCborMap &cbor_map)