#ifndef JSON_TEST_H
#define JSON_TEST_H

#include "aliases.h"
#include <stdbool.h>

#if 0

typedef struct json_obj_pair jobj_pair_t;
typedef struct json_coll jcoll_t;
typedef struct json_val jval_t;

typedef enum {
  JSON_OBJECT,
  JSON_ARRAY,
} jcoll_type_t;

typedef enum {
  JSON_COLLECTION,
  JSON_STRING,
  JSON_INTEGER,
  JSON_DOUBLE,
  JSON_TRUE,
  JSON_FALSE,
  JSON_NULL,
} jval_type;

struct json_val {
  jval_type type;
  union {
    jcoll_t *collection;
    const char *string;
    i64 num_int;
    f64 num_dbl;
    bool boolean;
  };
};

struct json_obj_pair {
  const char *key;
  jval_t value;
};

struct json_coll {
  jcoll_type_t type;
  u64 size;
  union {
    jobj_pair_t pairs[50];
    jval_t items[50];
  };
};

#endif

#endif // !JSON_TEST_H