[systemd-devel] [PATCH 2/5] shared/json: JSON parser + number tokenizer bugfix
Lennart Poettering
lennart at poettering.net
Fri May 15 06:23:51 PDT 2015
On Thu, 07.05.15 17:47, Pavel Odvody (podvody at redhat.com) wrote:
Hmm, so if I grok this right, then this at's a DOM-like ("object
model") parser for json, where we previously hat a SAX-like ("stream")
parser only. What's the rationale for this? Why doesn't the stream
parser suffice?
I intentionally opted for a stream parser when I wrote the code, and
that#s actually the primary reason why i roleld my own parser here,
instead of using some existing library....
> Signed-off-by: Pavel Odvody <podvody at redhat.com>
> ---
> src/shared/json.c | 437 ++++++++++++++++++++++++++++++++++++++++++++++++++++--
> src/shared/json.h | 36 +++++
> 2 files changed, 463 insertions(+), 10 deletions(-)
>
> diff --git a/src/shared/json.c b/src/shared/json.c
> index 45c8ece..00d5fce 100644
> --- a/src/shared/json.c
> +++ b/src/shared/json.c
> @@ -21,17 +21,173 @@
Lennart
--
Lennart Poettering, Red Hat
More information about the systemd-devel
mailing list