aboutsummaryrefslogtreecommitdiff
path: root/src/json.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/json.c')
-rw-r--r--src/json.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/json.c b/src/json.c
new file mode 100644
index 0000000..8bf3ed7
--- /dev/null
+++ b/src/json.c
@@ -0,0 +1,21 @@
+#include "json.h"
+
+static void fill_item(HouseItem *item, char *key_buffer, char *value_buffer);
+static void fill_buffer(FILE *fp, char *key_buffer, char *value_buffer);
+
+void json_read(const char *filepath, HouseItem *out)
+{
+ FILE *fp;
+ fp = fopen(filepath, "r");
+ if (fp == NULL) {
+ perror("json_read() Error");
+ exit(1);
+ }
+
+ char c, key_buffer[1024], value_buffer[1024];
+ size_t out_size = 0;
+ while ((c = fgetc(fp)) != EOF) {
+ switch (c) {
+ }
+ }
+}
Feel free to download, copy and edit any repo