From 4a14e0945732e5c67aca01d6bd070d00d1697d9a Mon Sep 17 00:00:00 2001 From: Eric Fischer Date: Fri, 7 Feb 2014 16:01:27 -0800 Subject: [PATCH] Clarify what types are used where --- jsonpull.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/jsonpull.h b/jsonpull.h index e69b201e..11be54b6 100644 --- a/jsonpull.h +++ b/jsonpull.h @@ -1,6 +1,12 @@ typedef enum json_type { + // These types can be returned by json_parse() JSON_HASH, JSON_ARRAY, JSON_NUMBER, JSON_STRING, JSON_TRUE, JSON_FALSE, JSON_NULL, - JSON_COMMA, JSON_COLON, JSON_ITEM, JSON_KEY, JSON_VALUE, + + // These and JSON_HASH and JSON_ARRAY can be called back by json_parse_with_separators() + JSON_COMMA, JSON_COLON, + + // These are only used internally as expectations of what comes next + JSON_ITEM, JSON_KEY, JSON_VALUE, } json_type; typedef struct json_object {