diff options
author | Felix Fietkau <nbd@openwrt.org> | 2011-01-30 03:13:32 +0300 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2011-01-30 03:13:32 +0300 |
commit | ff585b97c0b061d3ef7a026a331fa0079e0a7d94 (patch) | |
tree | a82f4603a4a61ba3792edc729d8db317487b6c93 /blobmsg.c | |
parent | 2d9f917d000025eaebcccf9fca758aa8b9a4763c (diff) |
fix json list parsing
Diffstat (limited to 'blobmsg.c')
-rw-r--r-- | blobmsg.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -155,7 +155,7 @@ static void blobmsg_format_json_list(struct strbuf *s, struct blob_attr *attr, i blobmsg_puts(s, (array ? " ]" : " }"), 2); } -char *blobmsg_format_json(struct blob_attr *attr) +char *blobmsg_format_json(struct blob_attr *attr, bool named) { struct strbuf s; @@ -163,7 +163,7 @@ char *blobmsg_format_json(struct blob_attr *attr) s.buf = malloc(s.len); s.pos = 0; - blobmsg_format_element(&s, attr, true, true); + blobmsg_format_json_list(&s, blob_data(attr), blob_len(attr), !named); if (!s.len) return NULL; |