Guarantee valid JSON in QMP, even for nonfinite numbers
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest4 patches 13 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | qobject: Correct JSON lexer grammar commentsqobject/ | +16 | 4 replies | |
| 2/4 | checkpatch: There is no qemu_strtod()scripts/ | +1 | 2 replies | |
| 3/4 | qobject: Parse non-finite numbers, as an extensiondocs/ qobject/ qobject/ +1 more | +79 | 4 replies | |
| 4/4 | qobject: Output valid JSON for non-finite numbersdocs/ qobject/ tests/ | +18 | 3 replies |
Reviews trailers per patch
2 of 4 patches have a Reviewed-by or Acked-by.
| Patch | Markus Armbruster |
|---|---|
| 1/4 | R-b |
| 2/4 | R-b |
| 3/4 | |
| 4/4 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [Qemu-devel] [PATCH 0/4] Guarantee valid JSON in QMP, even for nonfinite numbers
Flesh out an idea that came up during my JSON visitor series. Semantic errors are nicer than lexical errors. While we generally consider any non-finite number a bug in our code (that is, we don't plan to expose them over QMP), at least we can guarantee that even with a bug in our code we are still giving the user valid JSON, similar to how we convert non-UTF-8 byte sequences to use the replacement character for valid UTF-8 output.
I hit a couple of checkpatch false negatives in while writing this series; one was easy to fix, but the other stumped me. It doesn't help that checkpatch tweaks also trigger checkpatch warnings...
Eric Blake (4):
qobject: Correct JSON lexer grammar comments
checkpatch: There is no qemu_strtod()
qobject: Parse non-finite numbers, as an extension
qobject: Output valid JSON for non-finite numbers
qobject/json-lexer.c | 32 ++++++++++++++++++++------- qobject/json-parser.c | 13 +++++++++-- qobject/qjson.c | 15 ++++++++++--- tests/check-qjson.c | 61 ++++++++++++++++++++++++++++++++++++++++++++------- docs/qmp-spec.txt | 4 ++++ scripts/checkpatch.pl | 2 +- 6 files changed, 105 insertions(+), 22 deletions(-)
Signature · 1 line
2.5.5