Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NZRBR-0000gb-5S for qemu-devel@nongnu.org; Mon, 25 Jan 2010 10:48:57 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NZRBM-0000ZH-GU for qemu-devel@nongnu.org; Mon, 25 Jan 2010 10:48:56 -0500 Received: from [199.232.76.173] (port=38233 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NZRBM-0000Yy-AD for qemu-devel@nongnu.org; Mon, 25 Jan 2010 10:48:52 -0500 Received: from mx1.redhat.com ([209.132.183.28]:11930) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NZRBL-0006lM-QU for qemu-devel@nongnu.org; Mon, 25 Jan 2010 10:48:52 -0500 From: Markus Armbruster References: <1264431623-6607-1-git-send-email-aliguori@us.ibm.com> Date: Mon, 25 Jan 2010 16:48:48 +0100 In-Reply-To: <1264431623-6607-1-git-send-email-aliguori@us.ibm.com> (Anthony Liguori's message of "Mon, 25 Jan 2010 09:00:23 -0600") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: [Qemu-devel] Re: [PATCH] json: escape u0000 .. u001F when outputting json List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org Anthony Liguori writes: > Markus Armbruster pointed out: > > JSON requires control characters in strings to be escaped. RFC 4627 > section 2.5: > > A string begins and ends with quotation marks. All Unicode > characters may be placed within the quotation marks except for the > characters that must be escaped: quotation mark, reverse solidus, and > the control characters (U+0000 through U+001F). > > We've been quoting the special escape sequences that JSON defines but we > haven't been encoding the full control character range. This patch fixes that. Looks good.