Add a new option specifier that will optionally add a JSON key=value pair
containing a nested object if the added object isn't NULL.
* n: json null value
*
* a: json object, must be non-NULL
+ * A: json object, omitted if NULL
*
* The value corresponds to the selected type.
*
rc = virJSONValueObjectAppendNull(jargs, key);
} break;
+ case 'A':
case 'a': {
virJSONValuePtr val = va_arg(args, virJSONValuePtr);
if (!val) {
+ if (type == 'A')
+ continue;
+
virReportError(VIR_ERR_INTERNAL_ERROR,
_("argument key '%s' must not have null value"),
key);