#if !defined (_JSON_)
#define  _JSON_

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>

#ifdef __cplusplus
extern "C"
{
#endif

typedef enum {
	JSON_NULL=0,
	JSON_OBJ,
	JSON_ARRAY,
	JSON_STR,
	JSON_OTHER,
} JSON_TYPE;

typedef struct _json_element{
	char*			name;
	JSON_TYPE				child_type;
	void*				child;
	struct _json_element*	next;
} JSON_ELEMENT;


char * create_json(JSON_ELEMENT *);
JSON_ELEMENT * get_json(char *);
void  free_json(JSON_ELEMENT *);
#ifdef __cplusplus
}
#endif

#endif 

