/* Copyright (c) 2015-2018 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "json-tree.h"
struct json_tree {
};
struct json_tree *
{
return tree;
}
{
}
static void
const char *value)
{
else
}
static void
{
}
}
static int
const char *value)
{
case JSON_TYPE_OBJECT_KEY:
/* "key": value - we already added the node and set its key,
so now just set the value */
break;
case JSON_TYPE_ARRAY:
/* element in array - add a new node */
break;
default:
return -1;
}
return 0;
}
const char *value)
{
switch (type) {
case JSON_TYPE_OBJECT_KEY:
return -1;
break;
case JSON_TYPE_ARRAY:
return -1;
break;
case JSON_TYPE_OBJECT:
} else {
return -1;
}
break;
case JSON_TYPE_OBJECT_END:
return -1;
break;
case JSON_TYPE_ARRAY_END:
return -1;
break;
case JSON_TYPE_STRING:
case JSON_TYPE_NUMBER:
case JSON_TYPE_TRUE:
case JSON_TYPE_FALSE:
case JSON_TYPE_NULL:
return -1;
break;
}
return 0;
}
const struct json_tree_node *
{
}
const struct json_tree_node *
{
return node;
}
return NULL;
}
const struct json_tree_node *
{
continue;
return node;
}
return NULL;
}