X-Git-Url: http://git.archive.openwrt.org/?p=project%2Flibubox.git;a=blobdiff_plain;f=blobmsg_json.h;h=9dfc02dcd02f02f143adbc7fc4e28137e0a486e6;hp=cd9ed33e4c49d258ded70598a26c71b61a8d17b1;hb=7a1057604ed2ad83434ed3be03728065b14a5e9c;hpb=d133da5562b36d5ac871cbe927bb9ecdf0569a51 diff --git a/blobmsg_json.h b/blobmsg_json.h index cd9ed33..9dfc02d 100644 --- a/blobmsg_json.h +++ b/blobmsg_json.h @@ -42,4 +42,18 @@ static inline char *blobmsg_format_json_indent(struct blob_attr *attr, bool list return blobmsg_format_json_with_cb(attr, list, NULL, NULL, indent); } +char *blobmsg_format_json_value_with_cb(struct blob_attr *attr, + blobmsg_json_format_t cb, void *priv, + int indent); + +static inline char *blobmsg_format_json_value(struct blob_attr *attr) +{ + return blobmsg_format_json_value_with_cb(attr, NULL, NULL, -1); +} + +static inline char *blobmsg_format_json_value_indent(struct blob_attr *attr, int indent) +{ + return blobmsg_format_json_value_with_cb(attr, NULL, NULL, indent); +} + #endif