[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 0/4] Guarantee valid JSON in QMP, even for nonfinite

From: Eric Blake
Subject: [Qemu-devel] [PATCH 0/4] Guarantee valid JSON in QMP, even for nonfinite numbers
Date: Thu, 9 Jun 2016 20:48:05 -0600

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(-)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]