On Fri, 28 May 2021, Jason H wrote:

> console.log("result:", JSON.stringify(App.result)); // this does not

> qrc:/screens/Result.qml:32: TypeError: Type error

My copy of ECMA-262, 5ᵗʰ edition, has JSON.stringify fail
(in the “abstract operation JO”, p.205, last ordered list
on the page, step 1) with TypeError if the object is cyclical,
i.e. contains a reference to itself.

Some JSON serialisers replace that with null nowadays.

I guess you could write some code to test whether it’s cyclical
and at which elements it recurses. If you feel not up to it,
write back and I’ll try (ECMAscript is not a language I feel
comfortable in either but I think I could manage).

bye,
//mirabilos
-- 
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

*************************************************
_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

Reply via email to