On Wednesday 15 April 2015 16:36:15 André Somers wrote:
> > The dilemma I'm in is, how can I tell the json writer to "append" to a
> > current json file without loading the whole file back in memory (eg
> > read json from file->edit in Qt->write back to file). Because, after a
> > while, I suppose the file will get quite large.
> 
> I don't think JSON is particulary suitable for this kind of application 
> (and neither is XML).

CBOR might be, since it does support "undefined length" maps and arrays.

As for XML, the format may not be suitable but QXmlStreamWriter is since it 
keeps the state of which tags it needs to close and allows you to simply 
stream data into it. On the receiver side, QXmlStreamReader is capable of 
receiving incomplete data and making the best it can with what has been 
completed.
-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to