From: Heng Li Date: Sun, 30 Nov 2014 05:53:37 +0000 (-0500) Subject: simplified format() due to a later change X-Git-Url: http://www.kaiwu.me/postgresql/commit/static/gitweb.js?a=commitdiff_plain;h=e06f674236064fd470ce6563dc76617b8dbc769f;p=klib.git simplified format() due to a later change --- diff --git a/kson.c b/kson.c index ad0a275..c5002fb 100644 --- a/kson.c +++ b/kson.c @@ -158,10 +158,7 @@ const kson_node_t *kson_query(const kson_node_t *p, int depth, ...) void kson_format_recur(const kson_node_t *p, int depth) { long i; - if (p->key) { - printf("\"%s\"", p->key); - if (p->v.str) putchar(':'); - } + if (p->key) printf("\"%s\":", p->key); if (p->type == KSON_TYPE_BRACKET || p->type == KSON_TYPE_BRACE) { putchar(p->type == KSON_TYPE_BRACKET? '[' : '{'); if (p->n) {