projects
/
jansson.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Parse an empty object correctly
[jansson.git]
/
src
/
load.c
diff --git
a/src/load.c
b/src/load.c
index
ace963a
..
54d53b1
100644
(file)
--- a/
src/load.c
+++ b/
src/load.c
@@
-274,7
+274,10
@@
static json_t *json_parse_object(json_lex *lex)
return NULL;
json_lex_scan(lex);
- while(1) {
+ if(lex->token == '}')
+ return object;
+
+ while(lex->token) {
char *key;
json_t *value;