On Sat, Mar 31, 2018 at 11:13:13 +0200, Peter Krempa wrote:
> On Thu, Mar 29, 2018 at 01:09:57 +0200, Ján Tomko wrote:
> > Check for the presence of Jansson library and prefer it to yajl
> > if possible.
> > 
> > The minimum required version is 2.7.
> > 
> > Internally, virJSONValue still stores numbers as strings even
> > though Jansson uses numeric variables for them.
> > 
> > The configure script is particularly hideous, but will hopefully
> > go away after we stop aiming to support compiling on CentOS 6.
> > 
> > Signed-off-by: Ján Tomko <jto...@redhat.com>
> > ---
> >  configure.ac       |   1 +
> >  m4/virt-json.m4    |  55 +++++++++++---
> >  src/util/virjson.c | 219 
> > +++++++++++++++++++++++++++++++++++++++++++++++++++++
> >  3 files changed, 264 insertions(+), 11 deletions(-)

[...]

> > +
> > +    case JSON_INTEGER:
> > +        ret = virJSONValueNewNumberLong(json_integer_value(json));
> > +        break;
> > +
> > +    case JSON_REAL:
> > +        ret = virJSONValueNewNumberDouble(json_real_value(json));
> > +        break;
> 
> After mi privatization of struct _virJSONValue it should be simple
> enough to add the same differetiation to our code.

As a side-note, the qemu QAPI schema differentiates these as well, thus
this change would make our schema validator more strict. Also it would
possibly have some test fallout

Attachment: signature.asc
Description: PGP signature

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to