/* Minimal JSON reader for the host test runner (not used on the Pico). Integers only, no escapes beyond \" and \\. */ #ifndef SEEDBOX_JSON_H #define SEEDBOX_JSON_H typedef enum { J_NULL, J_BOOL, J_NUM, J_STR, J_ARR, J_OBJ } jtype; typedef struct jval { jtype type; long long num; /* J_NUM, J_BOOL */ char *str; /* J_STR */ char *key; /* set when the value sits inside an object */ struct jval **items; /* J_ARR, J_OBJ */ int n; } jval; jval *json_parse_file(const char *path); jval *json_get(const jval *obj, const char *key); /* NULL if missing */ jval *json_at(const jval *arr, int i); void json_free(jval *v); #endif