projects
/
project
/
libubox.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
jshn: shorten JSON_VAR to J_V
[project/libubox.git]
/
blobmsg_json.c
diff --git
a/blobmsg_json.c
b/blobmsg_json.c
index
8f208e0
..
ffde23d
100644
(file)
--- a/
blobmsg_json.c
+++ b/
blobmsg_json.c
@@
-17,6
+17,12
@@
#include "blobmsg.h"
#include "blobmsg_json.h"
#include "blobmsg.h"
#include "blobmsg_json.h"
+#ifdef JSONC
+ #include <json.h>
+#else
+ #include <json/json.h>
+#endif
+
bool blobmsg_add_object(struct blob_buf *b, json_object *obj)
{
json_object_object_foreach(obj, key, val) {
bool blobmsg_add_object(struct blob_buf *b, json_object *obj)
{
json_object_object_foreach(obj, key, val) {
@@
-76,7
+82,7
@@
static bool __blobmsg_add_json(struct blob_buf *b, json_object *obj)
{
bool ret = false;
{
bool ret = false;
- if (
is_error(obj)
)
+ if (
!obj
)
return false;
if (json_object_get_type(obj) != json_type_object)
return false;
if (json_object_get_type(obj) != json_type_object)