I have done a bit of work with the luci lua interface to ubus and I have found the following issues
The libubus-lua library does the following with the ubus types
NOTE: Usually the only digit type in Lua is "number" which is represented as a double float, some lua versions do support integers
When converting back Lua values are mapped as shown below:
NOTE: there is no double returned.
In my view it would have been better to return numbers as doubles
Since the library only allows me to pass floats via INT64, and I can't return them, and I can't modify the library without breaking other utilities that rely on its "broken" and missing functionality
I have decided to pass all numbers and strings, as strings and then do the conversion to numbers in the receiving system. This is convenient and reasonably straight forward in C with the ati and atof functions