qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Re: Registering buffers with a qdict


From: Jan Kiszka
Subject: Re: [Qemu-devel] Re: Registering buffers with a qdict
Date: Mon, 10 May 2010 15:43:40 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666

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. :)

> 
>> 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.

Jan

-- 
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux




reply via email to

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