On 09/21/2012 12:18 PM, Eric Blake wrote: >> Any better ideas? > > Maybe s/hex/number/, as in: > > JSON: 'number':0x20 > > C code: keylist->value->number = number; > > that is, you are passing the value either as a keycode name, or as a number. Or even s/hex/int/ except that the C code would then have to use mangling (since the JSON name would match a C keyword). -- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org