mirror of
https://github.com/mapbox/tippecanoe.git
synced 2025-04-05 01:59:06 +00:00
Basic data types
This commit is contained in:
commit
c3cda93a77
27
json.c
Normal file
27
json.c
Normal file
@ -0,0 +1,27 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
typedef enum json_type {
|
||||
JSON_STRING, JSON_NUMBER, JSON_ARRAY, JSON_OBJECT, JSON_NULL, JSON_TRUE, JSON_FALSE,
|
||||
} json_type;
|
||||
|
||||
typedef struct json_array {
|
||||
struct json_object *object;
|
||||
struct json_array *next;
|
||||
} json_array;
|
||||
|
||||
typedef struct json_hash {
|
||||
struct json_object *key;
|
||||
struct json_object *value;
|
||||
struct json_hash *next;
|
||||
} json_hash;
|
||||
|
||||
typedef struct json_object {
|
||||
json_type type;
|
||||
struct json_object *parent;
|
||||
|
||||
char *string;
|
||||
double number;
|
||||
json_array *array;
|
||||
json_hash *object;
|
||||
} json_object;
|
Loading…
x
Reference in New Issue
Block a user