Stop Integer Coercion to Scientific Notation in JSON

Sannyasin Brahmanathaswami brahma at hindu.org
Tue Sep 10 15:56:23 EDT 2019


setPref "preferences/global/lastRunDate", (the seconds) # e.g 1568144731

put getPref ("preferences/global/lastRunDate") into tLastRunDate

	returns
			{"preferences": 
				{"global":	
		 			{"lastRunDate": 1.56814e+09}, [snip]

# we are using jsonImport

 		 put jsonImport(tJSON) into tPreferencesA

# handle data and

   		put jsonExport(tPreferencesA) into tJSON.

# thereafter my simple arithmetic functions like

		put (tLastRunDate + 3600) into 1HourLater

# now throw a "left operand" error....

How can we prevent the coercion of simple integer notation to scientific?

Why is it needed for simple 10 digit number is beyond me.

There is nothing about automatic coercion in the dictionary.

BR











More information about the use-livecode mailing list