From: Alexander Graf <agraf@suse.de>
To: Eric Blake <eblake@redhat.com>, qemu-devel@nongnu.org
Cc: amit.shah@redhat.com, pbonzini@redhat.com, afaerber@suse.de,
quintela@redhat.com
Subject: Re: [Qemu-devel] [PATCH v3 1/5] QJSON: Add JSON writer
Date: Tue, 06 Jan 2015 22:39:26 +0100 [thread overview]
Message-ID: <54AC560E.6050900@suse.de> (raw)
In-Reply-To: <54AC023D.80501@redhat.com>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 06.01.15 16:41, Eric Blake wrote:
> On 12/26/2014 07:42 AM, Alexander Graf wrote:
>> To support programmatic JSON assembly while keeping the code that
>> generates it readable, this patch introduces a simple JSON
>> writer. It emits JSON serially into a buffer in memory.
>>
>> The nice thing about this writer is its simplicity and low memory
>> overhead. Unlike the QMP JSON writer, this one does not need to
>> spawn QObjects for every element it wants to represent.
>>
>> This is a prerequisite for the migration stream format
>> description generator.
>>
>> Signed-off-by: Alexander Graf <agraf@suse.de> --- Makefile.objs
>> | 1 + include/qjson.h | 28 +++++++++++++++++ qjson.c |
>> 97 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3
>> files changed, 126 insertions(+) create mode 100644
>> include/qjson.h create mode 100644 qjson.c
>
>> +struct QJSON { + QString *str; + bool omit_comma; +
>> unsigned long self_size_offset;
>
> Would size_t be smarter for this field?
Turns out the smartest thing to do is to remove the field - it was
unused :).
Btw, thanks a lot for the review!
Alex
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.22 (Darwin)
Comment: GPGTools - http://gpgtools.org
iQIcBAEBAgAGBQJUrFYOAAoJECszeR4D/txgCFgP/0r29Xbr/5Ly0MJsP2TN9VcK
NKSL31izigBmQ60Z6cf8sTzqPwZ0mgrFEUBelqz102dWu2DXe+DHa0Uel15/Gxd2
ZR8RVtY86mIvSfdARGShF+pzcUdzMUKlliYbagQglb9zHnnRkYR0VtXy6G1CQczq
lzQDZT0OW9m75+/PPC2V1/g8aWYZbgODI0w+CKEFQM8znhq3qVqiFcRx3HuLHwch
8FiuLYen4XzGjOZDj2oLyU8Aescwkdot4AkfAgf63TJmN2zyhXZQy6BFuJOfoYJK
5no4k7xNvjHX83fx9cT0RdQ6fZzfF/NcRKNlMdJmoi+0dDe87mzahR4Yufs0X+ir
xPIRKXuQWSSJgroboHVQOAlg0IYNdYn5Km3JK8Jx9yBnl6Me0Ow5P6oI0ZAeorWF
vzf395oFq6m29uaMUtmyMfk8dL023xJYIbYr2euoP0gipVvWAKKnBpWc4nWVrq3y
6SnlMbzyA5mb4I0iHGyaQp4WGvFFA/uwW8k+Xz5KpMJgQQoIrtvDaUw0E3f+YHGC
x2/a3FLmxhDAYIBfKlSBWpejG5OuIT6Af5t5xvDO45B+izGVm3WPctEYVkkYTSeq
jaqDpkdBZY8HxG+oYnJzH8wxPSELLM61PqYZyrDTMPdzepthepYgXCSWTFmBMZD7
OhJSkVksn4Khk0x7l1gy
=5f/z
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2015-01-06 21:39 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-26 14:42 [Qemu-devel] [PATCH v3 0/5] Migration Deciphering aid Alexander Graf
2014-12-26 14:42 ` [Qemu-devel] [PATCH v3 1/5] QJSON: Add JSON writer Alexander Graf
2015-01-06 15:41 ` Eric Blake
2015-01-06 21:39 ` Alexander Graf [this message]
2014-12-26 14:42 ` [Qemu-devel] [PATCH v3 2/5] " Alexander Graf
2015-01-06 15:44 ` Eric Blake
2015-01-06 21:16 ` Alexander Graf
2014-12-26 14:42 ` [Qemu-devel] [PATCH v3 3/5] qemu-file: Add fast ftell code path Alexander Graf
2015-01-06 15:46 ` Eric Blake
2014-12-26 14:42 ` [Qemu-devel] [PATCH v3 4/5] migration: Append JSON description of migration stream Alexander Graf
2015-01-06 15:56 ` Eric Blake
2015-01-06 21:25 ` Alexander Graf
2015-01-20 10:30 ` Amit Shah
2014-12-26 14:42 ` [Qemu-devel] [PATCH v3 5/5] Add migration stream analyzation script Alexander Graf
2015-01-06 16:05 ` Eric Blake
2015-01-06 21:29 ` Alexander Graf
2015-01-20 10:31 ` [Qemu-devel] [PATCH v3 0/5] Migration Deciphering aid Amit Shah
2015-01-20 10:54 ` Alexander Graf
2015-01-21 6:05 ` Amit Shah
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=54AC560E.6050900@suse.de \
--to=agraf@suse.de \
--cc=afaerber@suse.de \
--cc=amit.shah@redhat.com \
--cc=eblake@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).