luci/libs/luci-lib-jsonc
Jo-Philipp Wich efcd487978 luci-lib-jsonc: improve handling of integral numeric values
Properly deal with integral numeric values exceeding the int32_t range
by replacing the cast logic with more fine grained checks:

 - Lua numbers which are integers in the first place are directly converted
   to JSON integers

 - Finite double Lua numbers which are integral are converted to JSON
   integer values

 - All other numeric values are converted to JSON doubles

This should bring the handling of large integral value in line with the
documented behavior of turning non-fractional Lua numbers into JSON
integers.

Fixes: #6647
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2023-10-25 22:42:23 +02:00
..
src luci-lib-jsonc: improve handling of integral numeric values 2023-10-25 22:42:23 +02:00
Makefile libs: add luci-lib-jsonc, a Lua binding for JSON-C 2015-01-26 16:49:23 +01:00