2014-06-13 02:34:57 +02:00
|
|
|
#include "bind_config.h"
|
|
|
|
|
|
|
|
#include <platform.h>
|
|
|
|
#include <kernel/types.h>
|
|
|
|
#include <kernel/jsonconf.h>
|
2014-06-13 17:04:06 +02:00
|
|
|
#include <util/log.h>
|
2014-06-13 02:34:57 +02:00
|
|
|
#include <cJSON.h>
|
|
|
|
|
|
|
|
void config_parse(const char *json)
|
|
|
|
{
|
|
|
|
cJSON * conf = cJSON_Parse(json);
|
|
|
|
if (conf) {
|
|
|
|
json_config(conf);
|
|
|
|
cJSON_Delete(conf);
|
2014-06-13 17:04:06 +02:00
|
|
|
} else {
|
|
|
|
log_error("json parse error: %s\n", cJSON_GetErrorPtr());
|
2014-06-13 02:34:57 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void config_read(const char *filename)
|
|
|
|
{
|
|
|
|
}
|