qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Re: ANN: QEMU Monitor Protocol git tree


From: Jamie Lokier
Subject: Re: [Qemu-devel] Re: ANN: QEMU Monitor Protocol git tree
Date: Wed, 23 Sep 2009 19:36:17 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

Anthony Liguori wrote:
> The main advantage of not relying on whitespace terminated messages is 
> that it gives us the ability to pretty print the protocol on the wire.  
> For instance, I'd rather read:
> 
> { "execute": "info",
>   "id" : "32",
>   "arguments": ["cpus"]}

I agree.  It's not even expensive.

It's still useful for parsers to easily find the end before parsing.

So declare the JSON terminator to be "}\n" or "}\r\n".  That shouldn't
occur anywhere inside a pretty printed structure.  The internal
closing braces are all followed by a comma.

:-)

-- Jamie






reply via email to

[Prev in Thread] Current Thread [Next in Thread]