From f30f862a60baf5a14f16cd98c4864ad442728595 Mon Sep 17 00:00:00 2001 From: Krzysztof Karas Date: Fri, 25 Jun 2021 14:34:11 +0200 Subject: [PATCH] json/json.h: add note on JSON objects and arrays Adds a note for JSON objects and arrays inside struct spdk_json_val. Additionally deletes double space in section about len field. Signed-off-by: Krzysztof Karas Change-Id: I5d52b37a7e8023df09e16cbf9805bd6775abc5c8 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8529 Tested-by: SPDK CI Jenkins Community-CI: Mellanox Build Bot Reviewed-by: Aleksey Marchuk Reviewed-by: Jim Harris --- include/spdk/json.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/spdk/json.h b/include/spdk/json.h index 516628b6b..fb075ef31 100644 --- a/include/spdk/json.h +++ b/include/spdk/json.h @@ -69,6 +69,9 @@ struct spdk_json_val { * * For SPDK_JSON_VAL_NUMBER, this points to the beginning of the number as represented in * the original JSON (text representation, not converted to a numeric value). + * + * For JSON objects and arrays, this points to their beginning and has a type + * set to SPDK_JSON_VAL_OBJECT_BEGIN or SPDK_JSON_VAL_ARRAY_BEGIN respectively. */ void *start; @@ -80,7 +83,7 @@ struct spdk_json_val { * * For SPDK_JSON_VAL_ARRAY_BEGIN and SPDK_JSON_VAL_OBJECT_BEGIN, * this is the number of values contained within the array or object (including - * nested objects and arrays, but not including the _END value). The array or object _END + * nested objects and arrays, but not including the _END value). The array or object _END * value can be found by advancing len values from the _BEGIN value. */ uint32_t len;