All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: qemu-devel@nongnu.org
Cc: armbru@redhat.com
Subject: [Qemu-devel] [PATCH 0/4] Guarantee valid JSON in QMP, even for nonfinite numbers
Date: Thu,  9 Jun 2016 20:48:05 -0600	[thread overview]
Message-ID: <1465526889-8339-1-git-send-email-eblake@redhat.com> (raw)

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

-- 
2.5.5

             reply	other threads:[~2016-06-10  2:48 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-10  2:48 Eric Blake [this message]
2016-06-10  2:48 ` [Qemu-devel] [PATCH 1/4] qobject: Correct JSON lexer grammar comments Eric Blake
2016-06-16 16:19   ` Markus Armbruster
2016-06-16 17:41     ` Eric Blake
2016-06-17  7:54       ` Markus Armbruster
2016-06-21 13:53         ` Eric Blake
2016-06-10  2:48 ` [Qemu-devel] [PATCH 2/4] checkpatch: There is no qemu_strtod() Eric Blake
2016-06-16 16:20   ` Markus Armbruster
2016-06-16 16:31     ` Paolo Bonzini
2016-06-10  2:48 ` [Qemu-devel] [PATCH 3/4] qobject: Parse non-finite numbers, as an extension Eric Blake
2016-06-16 15:38   ` Markus Armbruster
2016-06-16 16:25     ` Markus Armbruster
2016-06-17  3:00       ` Eric Blake
2016-06-17  8:04         ` Markus Armbruster
2016-06-10  2:48 ` [Qemu-devel] [PATCH 4/4] qobject: Output valid JSON for non-finite numbers Eric Blake
2016-06-16 16:17   ` Markus Armbruster
2016-06-17  3:06     ` Eric Blake
2016-06-17  8:14       ` Markus Armbruster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1465526889-8339-1-git-send-email-eblake@redhat.com \
    --to=eblake@redhat.com \
    --cc=armbru@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.