[LEDE-DEV] [OpenWrt-Devel] [PATCH] blobmsg_json: handle conversion of large integers from JSON

Florian Larysch fl at n621.de
Tue Oct 25 05:56:54 PDT 2016


> IIUC, your change makes the type of fields vary upon their values.
> I'm wondering how you suggest applications parse the resulting blob messages?

you're right, this doesn't make sense. In my case, the only consumer was
using blobmsg_format_json(), which handles element types dynamically.

This patch would break users of blobmsg_parse() in some cases, please
disregard it.

> This has been somewhat discussed in the past (see
> https://lists.openwrt.org/pipermail/openwrt-devel/2016-June/041700.html).

While I agree with you that all options would cause a ABI break in the
strict sense that the raw blob might change in an incompatible way, this
could be handled in libubox without causing an ABI break there (for
example by capping values like libjson-c does). In that light, options 3
and 4 are largely equivalent.

Options 1 and 2 would be a bit wasteful, IMO. 


More information about the Lede-dev mailing list