From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N3vwT-0001WG-34 for qemu-devel@nongnu.org; Fri, 30 Oct 2009 14:11:17 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N3vwM-0001Pi-E4 for qemu-devel@nongnu.org; Fri, 30 Oct 2009 14:11:16 -0400 Received: from [199.232.76.173] (port=59542 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N3vwM-0001PX-2h for qemu-devel@nongnu.org; Fri, 30 Oct 2009 14:11:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:62781) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N3vwL-0006NQ-Im for qemu-devel@nongnu.org; Fri, 30 Oct 2009 14:11:09 -0400 Message-ID: <4AEB2C2F.9050305@redhat.com> Date: Fri, 30 Oct 2009 19:10:55 +0100 From: Paolo Bonzini MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [RFC 0/7] QError v1 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> <20091030180943.GA8649@shareable.org> In-Reply-To: <20091030180943.GA8649@shareable.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jamie Lokier Cc: qemu-devel@nongnu.org, Anthony Liguori , Luiz Capitulino , Gerd Hoffmann , hollisb@linux.vnet.ibm.com On 10/30/2009 07:09 PM, Jamie Lokier wrote: > 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? Maybe no, but that would complicate the parser uselessly. I don't think two apostrophes are a huge problem, since 'code' is already a bigger improvement over \"code\". Paolo