make wrong parsing a wrong string a bit more logical - json2tsv - JSON to TSV converter
(HTM) git clone git://git.codemadness.org/json2tsv
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 38d0984744efb248bfe773431d922a63cd09e0e3
(DIR) parent 216c4f342f22413073cfa9a98cb069b93eb0ecb4
(HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Tue, 15 Oct 2019 18:50:21 +0200
make wrong parsing a wrong string a bit more logical
test:
{"a" "b"}
result:
handle as "ab" instead of ignoring "a"
{1"a"} is now:
"1a" (string) instead of "a"
Diffstat:
M json2tsv.c | 1 -
1 file changed, 0 insertions(+), 1 deletion(-)
---
(DIR) diff --git a/json2tsv.c b/json2tsv.c
@@ -147,7 +147,6 @@ parsejson(void (*cb)(struct json_node *, size_t, const char *), const char **err
nodes[depth].type = TYPE_PRIMITIVE;
break;
case '"':
- v = 0;
nodes[depth].type = TYPE_STRING;
for (escape = 0; (c = GETNEXT()) != EOF;) {
/* 0x7f is not defined as a control-character in strings in the RFC */