From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N3vv6-0000AD-NG for qemu-devel@nongnu.org; Fri, 30 Oct 2009 14:09:52 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N3vv1-00005u-Fr for qemu-devel@nongnu.org; Fri, 30 Oct 2009 14:09:52 -0400 Received: from [199.232.76.173] (port=59524 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N3vv0-00005a-S7 for qemu-devel@nongnu.org; Fri, 30 Oct 2009 14:09:46 -0400 Received: from mail2.shareable.org ([80.68.89.115]:38245) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1N3vv0-0006Cr-Ft for qemu-devel@nongnu.org; Fri, 30 Oct 2009 14:09:46 -0400 Date: Fri, 30 Oct 2009 18:09:43 +0000 From: Jamie Lokier Subject: Re: [Qemu-devel] Re: [RFC 0/7] QError v1 Message-ID: <20091030180943.GA8649@shareable.org> References: <1256841750-15228-1-git-send-email-lcapitulino@redhat.com> <4AEA133A.8010906@redhat.com> <20091030102809.1c520282@doriath> <4AEAE261.5030908@redhat.com> <4AEAE56E.8040309@us.ibm.com> <20091030162849.GH3579@shareable.org> <4AEB2523.7020304@us.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4AEB2523.7020304@us.ibm.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org, Paolo Bonzini , Luiz Capitulino , Gerd Hoffmann , hollisb@linux.vnet.ibm.com Anthony Liguori wrote: > Jamie Lokier wrote: > >Anthony Liguori wrote: > > > >>Okay, let's get more clever then and do: > >> > >>#define QERR_DEV_NFOUND "{ 'code': 404, 'name': %s}" > >> > > > >By the way, since you've already invented a non-standard JSON > >extension, which is the single quotes, why not go a step further and > >permit the quotes to be omitted for simple tokens? > > > >#define QERR_DEV_NFOUND "{ code: 404, name: %s}" > > > >Much neater, IMHO. > > > > Javascript has keywords (like true, false, and null) that could lead to > confusion using such a syntax. I was thinking only before the colon in a dictionary. Are the keywords a problem in those positions, for Qemu? -- Jamie