From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41994) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c94tj-0007Nu-O4 for qemu-devel@nongnu.org; Tue, 22 Nov 2016 01:49:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c94tg-0002Av-Li for qemu-devel@nongnu.org; Tue, 22 Nov 2016 01:49:43 -0500 Received: from mx6-phx2.redhat.com ([209.132.183.39]:41521) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c94tg-0002AJ-C4 for qemu-devel@nongnu.org; Tue, 22 Nov 2016 01:49:40 -0500 Date: Tue, 22 Nov 2016 01:49:37 -0500 (EST) From: Paolo Bonzini Message-ID: <1544471039.1052299.1479797377342.JavaMail.zimbra@redhat.com> In-Reply-To: <62F97615-8739-43D4-B09C-1C34091C54D7@gmail.com> References: <673F175E-AF65-4F4F-9895-C7335A36AC29@gmail.com> <8b136de6-490a-d194-b7a6-eabfb87daf2c@redhat.com> <16AF327F-E1FE-4F2E-9919-A474276474FF@gmail.com> <182f25fb-98bd-73db-62f3-ff18b30a49cd@redhat.com> <3c5fdd4e-da35-46d9-9c64-a1a269f41646@redhat.com> <62F97615-8739-43D4-B09C-1C34091C54D7@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] qobject/qjson.c:69: failed assertion `obj != NULL' List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: G 3 Cc: Eric Blake , Markus Armbruster , qemu-devel qemu-devel > On Nov 21, 2016, at 3:46 PM, Eric Blake wrote: > > On 11/21/2016 02:36 PM, Eric Blake wrote: > > > but I'd argue that using qobject_from_jsonf() is already less-than- > > > useful. > > > > In fact, we are down to only a handful of users of our modified > > 'jsonf' > > format (that is, strings that mix JSON with % modifiers): > > > > hw/pci/pcie_aer.c: build a 5-element QDict > > monitor.c: build a 1-element QDict which contains a 2-element QDict > > qapi/qmp-dispatch.c: build a 2-element QDict > > qapi/qmp-event.c: Build a 2-element QDict > > > > plus the testsuite (check-qjson.c). > > I'm severely tempted to just rip out all of the poorly- > > underdocumented % parsing from the JSON parser, Go ahead. In fact, at least pci_aer.c should either use a QAPI type (and it doesn't only because the error injection command is HMP-only) or can just use a C struct. The others are mostly internal details and can build the QDict manual. Paolo