projects
/
project
/
libubox.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix json list parsing
[project/libubox.git]
/
blobmsg.c
diff --git
a/blobmsg.c
b/blobmsg.c
index
bdc5ef7
..
69a160b
100644
(file)
--- a/
blobmsg.c
+++ b/
blobmsg.c
@@
-155,7
+155,7
@@
static void blobmsg_format_json_list(struct strbuf *s, struct blob_attr *attr, i
blobmsg_puts(s, (array ? " ]" : " }"), 2);
}
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;
{
struct strbuf s;
@@
-163,7
+163,7
@@
char *blobmsg_format_json(struct blob_attr *attr)
s.buf = malloc(s.len);
s.pos = 0;
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;
if (!s.len)
return NULL;