[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] qemu: json: Fix parsing of integers >= 0x800000
From: |
Daniel P. Berrange |
Subject: |
Re: [Qemu-devel] [PATCH] qemu: json: Fix parsing of integers >= 0x8000000000000000 |
Date: |
Mon, 23 May 2011 17:06:23 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Mon, May 23, 2011 at 10:59:29AM -0500, Anthony Liguori wrote:
> 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.
We use the YAJL json library for parsing & formatting JSON. When
parsing, it validates that the number is valid according to the
JSON grammer, and then passes it without semantic interpretation
onto the app using the library. So with YAJL, it is the app (libvirt)
which decides the whether to treat this as a float, double, int64,
uint64 as appropriate to the context of the JSON document.
Regards,
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
- Re: [Qemu-devel] [PATCH] qemu: json: Fix parsing of integers >= 0x8000000000000000, (continued)
- Re: [Qemu-devel] [PATCH] qemu: json: Fix parsing of integers >= 0x8000000000000000, Daniel P. Berrange, 2011/05/23
- Re: [Qemu-devel] [PATCH] qemu: json: Fix parsing of integers >= 0x8000000000000000, Markus Armbruster, 2011/05/23
- Re: [Qemu-devel] [PATCH] qemu: json: Fix parsing of integers >= 0x8000000000000000, Daniel P. Berrange, 2011/05/23
- Re: [Qemu-devel] [PATCH] qemu: json: Fix parsing of integers >= 0x8000000000000000, Anthony Liguori, 2011/05/23
- Re: [Qemu-devel] [PATCH] qemu: json: Fix parsing of integers >= 0x8000000000000000, Richard W.M. Jones, 2011/05/23
- Re: [Qemu-devel] [PATCH] qemu: json: Fix parsing of integers >= 0x8000000000000000, Anthony Liguori, 2011/05/23
- Re: [Qemu-devel] [PATCH] qemu: json: Fix parsing of integers >= 0x8000000000000000, Richard W.M. Jones, 2011/05/23
- Re: [Qemu-devel] [PATCH] qemu: json: Fix parsing of integers >= 0x8000000000000000, Anthony Liguori, 2011/05/23
- Re: [Qemu-devel] [PATCH] qemu: json: Fix parsing of integers >= 0x8000000000000000,
Daniel P. Berrange <=
- Re: [Qemu-devel] [PATCH] qemu: json: Fix parsing of integers >= 0x8000000000000000, Daniel P. Berrange, 2011/05/23
- Re: [Qemu-devel] [PATCH] qemu: json: Fix parsing of integers >= 0x8000000000000000, Markus Armbruster, 2011/05/23
- Re: [Qemu-devel] [PATCH] qemu: json: Fix parsing of integers >= 0x8000000000000000, Anthony Liguori, 2011/05/23
- Re: [Qemu-devel] [PATCH] qemu: json: Fix parsing of integers >= 0x8000000000000000, Markus Armbruster, 2011/05/24
- [Qemu-devel] Use a hex string (was: [PATCH] qemu: json: Fix parsing of integers >= 0x8000000000000000), Jamie Lokier, 2011/05/23
- Re: [Qemu-devel] Use a hex string, Anthony Liguori, 2011/05/23
- Re: [Qemu-devel] Use a hex string, Jamie Lokier, 2011/05/24
- Re: [Qemu-devel] [PATCH] qemu: json: Fix parsing of integers >= 0x8000000000000000, Anthony Liguori, 2011/05/23