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

2016-10-25 Thread Florian Larysch
Hi, > 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.

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

2016-10-25 Thread Eyal Birger
Hi, On Wed, Oct 19, 2016 at 1:10 PM, Florian Larysch wrote: > Currently, libubox uses json_object_get_int when converting a JSON > document into a blobmsg. However, json-c stores integers as int64_t > values and may clamp the value when asked to return it as an int32_t. > > Always use json_object