Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions json.h
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,7 @@ json_deq(struct json_token *tok)
{
/* dequotes a string token */
if (tok->str[0] == '\"' && tok->len >= 2)
tok->str++; tok->len-=2;
tok->str++, tok->len-=2;
}
JSON_INTERN json_number
json_ipow(int base, unsigned exp)
Expand Down Expand Up @@ -851,7 +851,7 @@ JSON_API struct json_iter
json_begin(const char *str, int len)
{
struct json_iter iter = JSON_ITER_NULL;
iter.src = str; iter.len = len;
iter.src = str, iter.len = len;
return iter;
}
JSON_API struct json_iter
Expand Down Expand Up @@ -958,7 +958,7 @@ json_read(struct json_token *obj, const struct json_iter* prev)
iter.src = cur;
iter.len = len;
return iter;
} cur--; len++;
} cur--, len++;
} break;
case JSON_STATE_UTF8_2: {
iter.go = json_go_utf8;
Expand Down Expand Up @@ -1230,7 +1230,7 @@ json_query(struct json_token *toks, int count, const char *path)
array.len = 0;

/* iterate over each array element and find the correct index */
iter++; i++;
iter++, i++;
for (j = 0; j < n; ++j) {
if (iter->type == JSON_ARRAY || iter->type == JSON_OBJECT) {
i = i + (iter->sub) + 1;
Expand Down