problem with large numbers in LC 8 arrays when exporting to json

Terry Judd terry.judd at unimelb.edu.au
Fri Mar 25 21:27:38 EDT 2016


OK, so I’m putting some times (as seconds() values) into an array and then exporting the array to json using the jsonExport() function in LC8.

When I query the various elements of the array containing these times individually they all report as expected (e.g. 1458954886). However, when I inspect the array in the debugger and when I export the array to a son string all the seconds values (and presumably any other large numbers) are displayed in the form 1.45895e+09. This is obviously fairly useless if I need to convert the values in the json back into times at a later stage.

Is this expected behavior in LC 8 or is it a bug? I can work around it by making the values into strings before putting them into the array but I shouldn’t have to – should I?

Terry…



More information about the use-livecode mailing list