29#include <QJsonDocument>
32#include <qjsonvalue.h>
46 *
this <<
"]" << Qt::endl;
54 *
this <<
"}" << Qt::endl;
64 *
this << Qt::endl <<
"[";
72 *
this << Qt::endl <<
"{";
80 doc.setObject(QCborValue(cbor_map).toJsonValue().toObject());
82 *
this << doc.toJson();
89 doc.setArray(QCborValue(cbor_array).toJsonValue().toArray());
91 *
this << doc.toJson();
100 *
this <<
"\"" << key <<
"\":";
108 *
this <<
"\"" << value <<
"\"";
115 *
this << integer_size_value;
123 *
this <<
"[\"" << str_list.join(
"\", \"") <<
"\"]" << Qt::endl;
129 *
this <<
"," << Qt::endl;
void appendValue(const QString &value)
writes String value to JSON text
void endArray()
ends an array in JSON output simply print "]"
void endMap()
ends an object in JSON output simply print "}"
void writeCborArray(const QCborArray &cbor_array)
converts a CBOR array (list) into JSON text in output
JsonStreamWriter(QIODevice *device)
build a QTextStream for JSON writer
void startMap()
start an object in JSON output simply print "{"
void writeArray(QStringList &str_list)
convert a string list to a JSON array
void appendKey(const QString &key)
writes a key (dictionary entry) to JSON text
virtual ~JsonStreamWriter()
void writeCborMap(const QCborMap &cbor_map)
converts a CBOR map (object) into JSON text in output
void startArray()
starts an array in JSON output simply print "["