[Interest] Can't JSON.stringify an object in QML

Thorsten Glaser t.glaser at tarent.de
Wed Jun 2 17:13:42 CEST 2021

On Wed, 2 Jun 2021, Jason H wrote:

> In that I was trying to illustrate an empty object (which may or may
> not be valid JSON)... but it works with Qt's QJsonDocument::toJson()

Empty objects are valid JSON, of course.

I’ve put together some code to check whether something is self-recursive
(please don’t laugh too hard; as I said, I am nowhere near being an
ECMAscript developer) and made sure to not, AFAICT, use any constructs
of ES6 so it should be decently portable.

Find it attached, but I also put it online for later improvements at:

Good luck,
Infrastrukturexperte • tarent solutions GmbH
Am Dickobskreuz 10, D-53121 Bonn • http://www.tarent.de/
Telephon +49 228 54881-393 • Fax: +49 228 54881-235
HRB AG Bonn 5168 • USt-ID (VAT): DE122264941
Geschäftsführer: Dr. Stefan Barth, Kai Ebenrett, Boris Esser, Alexander Steeg


Mit dem tarent-Newsletter nichts mehr verpassen: www.tarent.de/newsletter

-------------- next part --------------
A non-text attachment was scrubbed...
Name: x.js
Type: application/javascript
Size: 3012 bytes
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20210602/023af493/attachment.js>

More information about the Interest mailing list