History | View | Annotate | Download (7.3 kB)
Add support for JSON pretty printing
The monitor does not pretty-print JSON output, so that everythingwill be on a single line reply. When JSON docs get large this isquite unpleasant to read. For the future command line capabilitiesquery ability, huge JSON docs will be available. This needs the...
qjson: Handle "\f"
It's valid JSON and should be handled.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
qjson: Improve debugging
Add an assert() to qobject_from_jsonf() to assure that the returnedQObject is not NULL. Currently this is duplicated in the callers.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
json: escape u0000 .. u001F when outputting json
Markus Armbruster pointed out:
JSON requires control characters in strings to be escaped. RFC 4627section 2.5:
A string begins and ends with quotation marks. All Unicode characters may be placed within the quotation marks except for the...
Introduce QError
QError is a high-level data type which represents an exceptionin QEMU, it stores the following error information:
- class Error class name (eg. "ServiceUnavailable")- description A detailed error description, which can contain...
QJSON: Introduce qobject_from_jsonv()
It accepts a va_list and will be used by QError. Also simplifiesthe code a little, as the other qobject_from_() functions canuse it.
Provide marshalling mechanism for json
This introduces qobject_to_json which will convert a QObject to a JSON stringrepresentation.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Add a QObject JSON wrapper
This provides a QObject interface for creating QObjects from a JSON expression.