Martin Schröder
713c8f5688
remove json-c dependency
2016-02-10 22:15:14 +01:00
Martin Schröder
09a8707f2f
fix compilation errors under openwrt
2016-01-14 15:13:19 +01:00
Martin Schröder
8931018c36
minor adjustments
2016-01-14 15:03:31 +01:00
Martin Schröder
e3b9c8d231
fix indents
2016-01-14 14:58:17 +01:00
Martin Schröder
6e7300536a
update json api and docs
2016-01-11 09:39:05 +01:00
Martin Schröder
e4828f4e3a
add ujson library. 2.5 times faster than json-c and now build into blobpack for easy conversion from json to a blob
2016-01-08 14:39:18 +01:00
Martin Schröder
cd4517025d
fix json formatting
2016-01-05 17:49:42 +01:00
Martin Schröder
a9f575b267
small update to docs and blob json formatting methods..
2015-12-29 00:31:14 +01:00
Martin Schröder
54e41c0c44
more cleanup
2015-12-29 00:11:37 +01:00
Martin Schröder
68a90c1e9a
minor bug fixes
2015-12-28 21:44:37 +01:00
Martin Schröder
9760abbf19
add new parsing function
2015-12-27 03:34:54 +01:00
Martin Schröder
e8d5171b68
add simple validator (not done yet!)
2015-12-25 12:01:29 +01:00
Martin Schröder
1f43c831fd
add ability to dump into json and to forcibly set type
2015-12-17 16:56:20 +01:00
Martin Schröder
ef73c55efc
refactored some more
2015-12-16 15:24:40 +01:00
Martin Schröder
6e08cf4507
more refactoring
2015-12-15 11:55:50 +01:00
Martin Schröder
aa40b78b3f
more refactoring
2015-12-14 16:29:39 +01:00
Martin Schröder
2fdc96c0b3
fix parsing
2015-12-11 15:16:36 +01:00
Martin Schröder
03368cb350
refactor blobmsg creation (parsing may still be broken!)
2015-12-11 15:01:34 +01:00
Martin Schröder
4611dca32b
add blob dump function and fix few bugs
2015-12-09 17:06:37 +01:00
Martin Schröder
ed846ed09e
update documentation
2015-12-07 16:02:12 +01:00
Martin Schröder
df2b24bc77
makefile: add install target
2015-12-07 16:02:01 +01:00
Martin Schröder
61a7b89d81
simplify blob code
2015-12-07 16:01:33 +01:00
Martin Schröder
aaad042ee8
add float32 and float64 packing support to blob and blobmsg
2015-12-06 23:36:33 +01:00
Martin Schröder
2b64090f00
obviously it reinit should reinitialize the head to point to the beginning of the buffer and then reset the head to an empty blob_attr
2015-12-06 20:59:06 +01:00
Martin Schröder
b557a0a155
fix simple example
2015-12-06 20:54:58 +01:00
Martin Schröder
75186ab333
add a garbage date test
2015-12-06 20:54:48 +01:00
Martin Schröder
4516817935
refactor spaghetti blob code
2015-12-06 20:54:33 +01:00
Martin Schröder
c0a6dd4d50
generate libblobpack as output
2015-12-06 16:28:38 +01:00
Martin Schröder
c59f0ad2d9
add README.md
2015-12-06 16:26:40 +01:00
Martin Schröder
163c685eeb
add blobpack.h file
2015-12-06 16:24:33 +01:00
Martin Schröder
be237cceca
add simple example
2015-12-06 16:24:21 +01:00
Martin Schröder
efe98864a1
refactor the library interface
2015-12-06 16:24:09 +01:00
Martin Schröder
24b88b8a72
add Makefile
2015-12-06 13:50:46 +01:00
Martin Schröder
e032aeef96
use json-c
2015-12-06 13:49:55 +01:00
Felix Fietkau
7b30ab5767
add a base64 implementation (based on FreeBSD code)
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2015-05-08 14:34:29 +02:00
Yousong Zhou
e90c595d20
utils: use clock_get_time() for clock_gettime() on Apple.
...
It turns out that mach_absolute_time() is not monotonic at all. While
at it, convert the CLOCK_REALTIME implementation to using
clock_get_time() as well.
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2015-01-21 20:11:30 +01:00
Yousong Zhou
7130941120
blobmsg: remove unneeded assignment in blobmsg_alloc_string_buffer().
...
data_dest should already be assigned by blobmsg_new() if the return
value is not NULL.
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2014-12-11 17:58:29 +01:00
Felix Fietkau
9d8ff4acb6
blobmsg_json: avoid redefinition of json_object
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-10-24 13:40:14 +02:00
Felix Fietkau
dc6759ede5
blobmsg_json: include json.h inside blobmsg_json.c instead of the public header file
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-09-23 12:03:32 +02:00
Felix Fietkau
76fe389326
avoid using the deprecated is_error() function from json-c
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-09-23 12:02:31 +02:00
Felix Fietkau
f90b452ff5
blobmsg: accept NULL attr in blobmsg_get_string()
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-08-03 15:00:54 +02:00
ewolfok
02a7fe19b1
blob: improve out-of-memory handling
...
Signed-off-by: Chen Bin <ewolfok@126.com>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-07-26 03:50:50 +02:00
Felix Fietkau
0c20abad92
blobmsg: add a helper function to reset the name of a blobmsg attribute
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-07-21 01:24:01 +02:00
Felix Fietkau
66b221aa27
blobmsg: add blobmsg_check_array, which returns the size of the array
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-07-15 10:52:12 +02:00
Felix Fietkau
ec68befdf8
blobmsg_json: use cross-platform macro for fprintf on 64-bit values
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-05-31 14:48:03 +02:00
Jacob Siverskog
9f55833619
blob/blobmsg: Perform explicit casts from void* to avoid compilation errors when using libubox from C++.
...
Signed-off by: Jacob Siverskog <jacob@teenageengineering.com>
2014-05-09 14:33:39 +02:00
Felix Fietkau
1b79a08d28
utils: add a bitfield size macro
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-04-30 13:27:03 +02:00
Felix Fietkau
dd1d8afe02
blobmsg: make length variables unsigned
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-04-27 16:32:09 +02:00
Felix Fietkau
dc82993cf2
blob: make length variables unsigned
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-04-27 16:29:31 +02:00
Felix Fietkau
5fe5d6bd88
blobmsg_json: let blobmsg_format_json_with_cb with list == true also format arrays
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-04-26 10:59:00 +02:00