blobmsg_json: export blobmsg_add_object
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
This commit is contained in:
parent
b7930023ee
commit
76f584c761
2 changed files with 2 additions and 1 deletions
|
@ -16,7 +16,7 @@
|
||||||
#include "blobmsg.h"
|
#include "blobmsg.h"
|
||||||
#include "blobmsg_json.h"
|
#include "blobmsg_json.h"
|
||||||
|
|
||||||
static bool blobmsg_add_object(struct blob_buf *b, json_object *obj)
|
bool blobmsg_add_object(struct blob_buf *b, json_object *obj)
|
||||||
{
|
{
|
||||||
json_object_object_foreach(obj, key, val) {
|
json_object_object_foreach(obj, key, val) {
|
||||||
if (!blobmsg_add_json_element(b, key, val))
|
if (!blobmsg_add_json_element(b, key, val))
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include "blobmsg.h"
|
#include "blobmsg.h"
|
||||||
|
|
||||||
|
bool blobmsg_add_object(struct blob_buf *b, json_object *obj);
|
||||||
bool blobmsg_add_json_element(struct blob_buf *b, const char *name, json_object *obj);
|
bool blobmsg_add_json_element(struct blob_buf *b, const char *name, json_object *obj);
|
||||||
bool blobmsg_add_json_from_string(struct blob_buf *b, const char *str);
|
bool blobmsg_add_json_from_string(struct blob_buf *b, const char *str);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue