qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] qemu: json: Fix parsing of integers >= 0x800000


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH] qemu: json: Fix parsing of integers >= 0x8000000000000000
Date: Mon, 23 May 2011 10:59:29 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110424 Lightning/1.0b2 Thunderbird/3.1.10

On 05/23/2011 10:29 AM, Richard W.M. Jones wrote:
On Mon, May 23, 2011 at 10:24:07AM -0500, Anthony Liguori wrote:
On 05/23/2011 10:19 AM, Richard W.M. Jones wrote:
What I suggested would let us work with any JSON client, but if
clients loose precision after 53-bits, those clients would not work
well with QEMU.

I totally agree that the JSON "standard" is completely underspecified
and not very useful (lacking a schema, strong typing, well-specified
limits).  Nevertheless, for better or worse it's what we're using.

There is one very important JSON client we are using called libvirt.

No, libvirt is a virtualization library. It happens to have a home grown JSON client but down the road, if there's a nice, common JSON library and it decides to switch to it, we don't want to have a bunch of compatibility issues that prevents that from happening.

The point of using a standard RPC is to support multiple clients. Otherwise, we should just stop calling it JSON and make it behave the way we want it to.

The alternative approach is to be conservative and only use 32-bit
integers and represent everything in two numbers.

Or use strings ...

JSON types are variant. We could send integers great than 53-bits back as strings.. This would break libvirt badly though.


Rich.





reply via email to

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