Initial commit

This commit is contained in:
olemorud
2023-04-24 17:13:47 +02:00
commit 4ce1c34838
12 changed files with 653 additions and 0 deletions

22
include/json_obj.h Normal file
View File

@@ -0,0 +1,22 @@
#ifndef _obj_H
#define _obj_H
#include <stdbool.h>
#include <stddef.h>
#define OBJ_SIZE 1024
typedef struct obj_entry {
char const* key;
struct json_value* val;
struct obj_entry* next;
} * __p_obj_entry;
typedef __p_obj_entry obj_t[OBJ_SIZE];
void* obj_at(obj_t m, char* const key);
bool obj_insert(obj_t m, char* const key, struct json_value* value);
void obj_delete(obj_t m);
#endif