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.