From 4506a85e6bd7a1edca2b11255efc01010d932c68 Mon Sep 17 00:00:00 2001 From: Eric Fischer Date: Wed, 5 Feb 2014 21:34:17 -0800 Subject: [PATCH] Add comments --- jsonpull.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jsonpull.c b/jsonpull.c index 46f20d52..d0745852 100644 --- a/jsonpull.c +++ b/jsonpull.c @@ -22,8 +22,10 @@ static json_object *add_object(json_type type, json_object *parent) { if (parent->type == JSON_HASH) { if (parent->hash != NULL && parent->hash->value == NULL) { + // Hash has key but no value, so this is the value parent->hash->value = o; } else { + // No current hash, so this is a key json_hash *h = malloc(sizeof(json_hash)); h->next = parent->hash; h->key = o;