blob(binary large object),二进制大对象,用于二进制对象序列化;blob主要在一些系统级组件(ubox/libubox/ubus/netifd)内部使用,一般应用不需要使用blob封装,blob用数据结构blob_attr表示。 blob_buf用于管理(多个)二进制大对象。 1. 数据结构 #defineBLOB_COOKIE 0x01234567enum{ BLOB_ATTR_UNSPEC, BLOB_ATTR_NESTED...
blobmsg_add_u8(b, name, json_object_get_boolean(obj)); break; case json_type_int: blobmsg_add_u32(b, name, json_object_get_int(obj)); break; case json_type_double: blobmsg_add_double(b, name, json_object_get_double(obj)); break; case json_type_null: blobmsg_add...
(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_file(struct blob_buf *b, const char *file); typedef const char *(*blobmsg_json_format_t)(void *priv, struct blob_attr ...
boolblobmsg_add_object(structblob_buf*b,structjson_object*obj); boolblobmsg_add_json_element(structblob_buf*b,constchar*name,structjson_object*obj); boolblobmsg_add_json_from_string(structblob_buf*b,constchar*str); boolblobmsg_add_json_from_file(structblob_buf*b,constchar*file); ...