Statistics
| Branch: | Revision:

root / json-parser.c @ 26ca8c06

History | View | Annotate | Download (16.5 kB)

# Date Author Comment
7b1b5d19 12/19/2012 09:31 am Paolo Bonzini

qapi: move include files to include/qobject/

Signed-off-by: Paolo Bonzini <>

65c0f1e9 08/16/2012 09:41 pm Michael Roth

json-parser: don't replicate tokens at each level of recursion

Currently, when parsing a stream of tokens we make a copy of the token
list at the beginning of each level of recursion so that we do not
modify the original list in cases where we need to fall back to an...

11e8a46c 06/07/2011 09:52 pm Anthony Liguori

json-parser: detect premature EOI

Signed-off-by: Michael Roth <>
Signed-off-by: Anthony Liguori <>

c1990ebf 06/07/2011 09:52 pm Michael Roth

json-parser: add handling for NULL token list

Currently a NULL token list will crash the parser, instead we have it
pass back a NULL QObject.

Signed-off-by: Michael Roth <>
Signed-off-by: Anthony Liguori <>

ef749d07 06/07/2011 09:52 pm Anthony Liguori

json-parser: propagate error from parser

Signed-off-by: Michael Roth <>
Signed-off-by: Anthony Liguori <>

8b7968f7 10/03/2010 09:34 am Stefan Weil

Use GCC_FMT_ATTR (format checking)

Signed-off-by: Stefan Weil <>
Signed-off-by: Blue Swirl <>

a2da0395 06/14/2010 05:39 pm Anthony Liguori

Merge remote branch 'qmp/for-anthony' into staging

11165820 06/13/2010 09:00 pm Paul Brook

Move stdbool.h

Move inclusion of stdbool.h to common header files, instead of including
in an ad-hoc manner.

Signed-off-by: Paul Brook <>

bd032695 06/11/2010 09:25 pm Luiz Capitulino

qjson: Handle "\f"

It's valid JSON and should be handled.

Signed-off-by: Luiz Capitulino <>

c96c84a9 03/27/2010 02:51 pm Amos Kong

json-parser: Output the content of invalid keyword

When input some invalid word 'unknowcmd' through QMP port, qemu outputs
this error message:
"parse error: invalid keyword `%s'"

This patch makes qemu output the content of invalid keyword, like:

"parse error: invalid keyword `unknowcmd'"...
d758d90f 03/06/2010 11:32 pm Kevin Wolf

json-parser: Fix segfault on malformed input

If the parser fails to parse the key in parse_pair, it will access a NULL
pointer. A simple way to trigger this is sending {foo} via QMP. This patch
turns the segfault into a syntax error reply.

Signed-off-by: Kevin Wolf <>...

2c0d4b36 02/10/2010 08:47 pm Roy Tam

json: fix PRId64 on Win32

OK we are fooled by the json lexer and parser. As we use %I64d to
print 'long long' variables in Win32, but lexer and parser only deal
with %lld but not %I64d, this patch add support for %I64d and solve
'info pci', 'powser_reset' and 'power_powerdown' assert failure in...

2da69c8d 01/14/2010 01:14 am Amit Shah

json-parser: remove dead increment

clang-analyzer points out a redundant increment.

Signed-off-by: Amit Shah <>
Signed-off-by: Anthony Liguori <>

4a5fcab7 11/17/2009 04:49 pm Anthony Liguori

Add a JSON parser

This is the third and final stage of the JSON parser. It parses lexical tokens
performing grammar validation and creating the final QObject representation. It
uses a recursive decent parser.

Signed-off-by: Anthony Liguori <>