diff options
Diffstat (limited to 'src/afb-proto-ws.c')
-rw-r--r-- | src/afb-proto-ws.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/afb-proto-ws.c b/src/afb-proto-ws.c index 142afa98..c079bf69 100644 --- a/src/afb-proto-ws.c +++ b/src/afb-proto-ws.c @@ -261,10 +261,11 @@ static int readbuf_object(struct readbuf *rb, struct json_object **object) { const char *string; struct json_object *o; + enum json_tokener_error jerr; int rc = readbuf_string(rb, &string, NULL); if (rc) { - o = json_tokener_parse(string); - if (o == NULL && strcmp(string, "null")) + o = json_tokener_parse_verbose(string, &jerr); + if (jerr != json_tokener_success) o = json_object_new_string(string); *object = o; } |