mirror of
https://github.com/sogou/workflow.git
synced 2026-02-08 01:33:17 +08:00
Add json_object_value_name().
This commit is contained in:
@@ -1180,6 +1180,12 @@ const json_value_t *json_object_prev_value(const json_value_t *val,
|
||||
return &list_entry(pos->prev, json_member_t, list)->value;
|
||||
}
|
||||
|
||||
const char *json_object_value_name(const json_value_t *val,
|
||||
const json_object_t *obj)
|
||||
{
|
||||
return list_entry(val, json_member_t, value)->name;
|
||||
}
|
||||
|
||||
static const json_value_t *__json_object_insert(const char *name,
|
||||
int type, va_list ap,
|
||||
struct list_head *pos,
|
||||
|
||||
@@ -60,6 +60,8 @@ const char *json_object_prev_name(const char *name,
|
||||
const json_object_t *obj);
|
||||
const json_value_t *json_object_prev_value(const json_value_t *val,
|
||||
const json_object_t *obj);
|
||||
const char *json_object_value_name(const json_value_t *val,
|
||||
const json_object_t *obj);
|
||||
const json_value_t *json_object_append(json_object_t *obj,
|
||||
const char *name,
|
||||
int type, ...);
|
||||
|
||||
Reference in New Issue
Block a user