jsontree: add uint type

This commit is contained in:
Jeff Kent 2015-12-28 09:45:23 -06:00
parent fcc87ddce8
commit bcc7d0a1eb
3 changed files with 24 additions and 6 deletions

View file

@ -74,6 +74,11 @@ struct jsontree_string {
const char *value;
};
struct jsontree_uint {
uint8_t type;
unsigned int value;
};
struct jsontree_int {
uint8_t type;
int value;
@ -136,6 +141,8 @@ void jsontree_reset(struct jsontree_context *js_ctx);
const char *jsontree_path_name(const struct jsontree_context *js_ctx,
int depth);
void jsontree_write_uint(const struct jsontree_context *js_ctx,
unsigned int value);
void jsontree_write_int(const struct jsontree_context *js_ctx, int value);
void jsontree_write_atom(const struct jsontree_context *js_ctx,
const char *text);