diff options
author | Anna (navi) Figueiredo Gomes <navi@vlhl.dev> | 2024-04-12 12:18:03 +0200 |
---|---|---|
committer | Anna (navi) Figueiredo Gomes <navi@vlhl.dev> | 2024-04-12 12:18:03 +0200 |
commit | 1dd3e1c8d7deb0fa6fe6208b2dd8d236d1f3fc2e (patch) | |
tree | 92c27ac0a3bf86bfe5f00214e691c3c388dcab27 /src/print.c | |
parent | 46bc58545b95ee1cba1292dcaeb46c60533e0184 (diff) |
libjson: new api
a lot... changed...
Signed-off-by: Anna (navi) Figueiredo Gomes <navi@vlhl.dev>
Diffstat (limited to 'src/print.c')
-rw-r--r-- | src/print.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/print.c b/src/print.c index e56d213..13e53d9 100644 --- a/src/print.c +++ b/src/print.c @@ -57,11 +57,8 @@ void print_item(struct json *json, char **str, int64_t *size, int64_t *index) { case JSON_NUMBER: append_printf(str, size, index, "%lf", json->num); break; - case JSON_TRUE: - append_printf(str, size, index, "true"); - break; - case JSON_FALSE: - append_printf(str, size, index, "false"); + case JSON_BOOL: + append_printf(str, size, index, json->boolean ? "true" : "false"); break; case JSON_NULL: append_printf(str, size, index, "null"); @@ -98,8 +95,6 @@ void print_item(struct json *json, char **str, int64_t *size, int64_t *index) { } append_printf(str, size, index, "\""); break; - case JSON_INVALID: - break; } } |