flavio / qjson

QJson is a qt-based library that maps JSON data to QVariant objects.
http://qjson.sourceforge.net
GNU Lesser General Public License v2.1
288 stars 140 forks source link

Add io device closing management in parser #76

Open xbroquer opened 9 years ago

xbroquer commented 9 years ago

Hi,

Today QJson library always closes the QIODevice at the end of parsing. This may cause problems with volatile data that are destroyed when the I/O device is closed (i.e. network connection, temporary file, memory buffer).

To prevent this, I added a prototype to the parser with a boolean to force the device to be closed after parsing. This does not break the old behavior and allows the client to choose if the file must be closed or not.

Is it possible to merge this change in the mainline ? Thanks, Xavier.