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

Jason H jhihn at gmx.com
Wed Jun 2 15:35:22 CEST 2021



> Sent: Tuesday, June 01, 2021 at 9:22 PM
> From: "Tony Rietwyk" <tony at rightsoft.com.au>
> To: interest at qt-project.org
> Subject: Re: [Interest] Can't JSON.stringify an object in QML
>
> HI Jason,
>
> I'm pretty sure this is NOT valid JSON:
>
>    {"that": "other": {} }
>
> Either the value and comma for "that" is missing, or "other": {} should


Ok, so I was typing that as an example, and meant to type:
    {"that": {"other": {} } }
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()






More information about the Interest mailing list