From 0a7e2f7f0c6fe12856d22b5588f82dc3f2eef613 Mon Sep 17 00:00:00 2001 From: Abdelrahman Said Date: Wed, 28 Jun 2023 20:50:37 +0100 Subject: [PATCH] Rename json entities --- include/json_entities/json_entities.h | 32 +++++++++++++-------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/include/json_entities/json_entities.h b/include/json_entities/json_entities.h index ae1fce2..03fb0e7 100644 --- a/include/json_entities/json_entities.h +++ b/include/json_entities/json_entities.h @@ -5,21 +5,21 @@ #include "dstring.h" #include -typedef struct jentity jentity_t; -typedef struct jcoll jcoll_t; -typedef struct jval jval_t; -typedef struct jpair jpair_t; +typedef struct json_entity jentity_t; +typedef struct json_collection jcoll_t; +typedef struct json_value jval_t; +typedef struct json_pair jpair_t; typedef enum { - JSON_VALUE_COLLECTION, - JSON_VALUE_STRING, - JSON_VALUE_INTEGER, - JSON_VALUE_DOUBLE, - JSON_VALUE_BOOLEAN, - JSON_VALUE_NULL, + JVAL_COLLECTION, + JVAL_STRING, + JVAL_INTEGER, + JVAL_DOUBLE, + JVAL_BOOLEAN, + JVAL_NULL, } jval_type; -struct jval { +struct json_value { jval_type type; union { jcoll_t *collection; @@ -30,17 +30,17 @@ struct jval { }; }; -struct jpair { +struct json_pair { dstr_t *key; jval_t value; }; typedef enum { - JVAL_SINGLE, - JVAL_PAIR, + JENTITY_SINGLE, + JENTITY_PAIR, } jentity_type; -struct jentity { +struct json_entity { jentity_type type; union { jval_t value; @@ -55,7 +55,7 @@ typedef enum { JCOLL_ARRAY, } jcoll_type; -struct jcoll { +struct json_collection { u64 size; jcoll_type type; jentity_t *first_child;