On 05/10/2010 04:43 PM, Jan Kiszka wrote:
Avi Kivity wrote:
On 05/10/2010 01:59 PM, Jan Kiszka wrote:
   From a quick glance at the JSON spec, there is no room for a new type. I
think we have to overload an existing one and convert that into a
QBuffer (typically, we know the actual semantic). Hex string encoding is
most compact, so I went this road.
Base64 is even more compact.
For sure, still room for improvements. There is just no encode() service
in current qemu, so I went the lazy way so far. :)

Well, if we expose these encoded buffers via QMP, we can't unlazy the implementation. It becomes an ABI, so we better think (and document) this through.

But I'm open to change it into a true
type if JSON actually allows it (or we are fine with breaking it).

That ruins any possibility of using a standard json encoder/decoder on
the other end.

That was my concern as well. Such decoders would not able to tell
strings apart from buffers as that can only be derived from the context.
Still, they could visualize the result and/or forward it to some libqmp
for proper interpretation.

That's fine; the documentation for a command that accepts or returns buffers would mention that the value is a hex (or base64) encoded string.

--
error compiling committee.c: too many arguments to function


Reply via email to