My program provides a large amount of data, organized in nested maps, that I would like to serialize and write in a file. Originally, I used a QJsonDocument with QJsonMap's and QJsonArray's, but the file writing process at the end is very long and the file too large (>400MB). So I looked into QCborStreamWriter but I can't find examples with nested maps.
Is there a way to do it ? QCborStreamWriter::append() does not take a QCborMap as argument.
QCborStreamWriter writer;
writer.startArray();
QCBorMap map;
writer.append(map); <= not accepted
writer.endArray();
Calling repeatedly startMap() and endMap() seems to do the trick.
and produces the following tree: